Commit 924426a5 authored by thestig@chromium.org's avatar thestig@chromium.org

Cleanup various Windows installer/breakpad bits.

Review URL: https://codereview.chromium.org/295893002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271699 0039d316-1c4b-4281-b951-d872f2087c98
parent 82dd993f
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "base/win/registry.h" #include "base/win/registry.h"
#include "chrome/installer/util/google_chrome_sxs_distribution.h" #include "chrome/installer/util/google_chrome_sxs_distribution.h"
#include "chrome/installer/util/install_util.h" #include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/util_constants.h"
#include "policy/policy_constants.h" #include "policy/policy_constants.h"
#endif #endif
...@@ -126,10 +127,8 @@ void ChromeBreakpadClient::GetProductNameAndVersion( ...@@ -126,10 +127,8 @@ void ChromeBreakpadClient::GetProductNameAndVersion(
*version = base::ASCIIToUTF16("0.0.0.0-devel"); *version = base::ASCIIToUTF16("0.0.0.0-devel");
} }
std::wstring channel_string;
GoogleUpdateSettings::GetChromeChannelAndModifiers( GoogleUpdateSettings::GetChromeChannelAndModifiers(
!GetIsPerUserInstall(exe_path), &channel_string); !GetIsPerUserInstall(exe_path), channel_name);
*channel_name = base::WideToUTF16(channel_string);
} }
bool ChromeBreakpadClient::ShouldShowRestartDialog(base::string16* title, bool ChromeBreakpadClient::ShouldShowRestartDialog(base::string16* title,
...@@ -185,15 +184,13 @@ bool ChromeBreakpadClient::GetIsPerUserInstall(const base::FilePath& exe_path) { ...@@ -185,15 +184,13 @@ bool ChromeBreakpadClient::GetIsPerUserInstall(const base::FilePath& exe_path) {
} }
bool ChromeBreakpadClient::GetShouldDumpLargerDumps(bool is_per_user_install) { bool ChromeBreakpadClient::GetShouldDumpLargerDumps(bool is_per_user_install) {
base::string16 channel_name(base::WideToUTF16( base::string16 channel_name =
GoogleUpdateSettings::GetChromeChannel(!is_per_user_install))); GoogleUpdateSettings::GetChromeChannel(!is_per_user_install);
// Capture more detail in crash dumps for beta and dev channel builds. // Capture more detail in crash dumps for beta and dev channel builds.
if (channel_name == base::ASCIIToUTF16("dev") || return (channel_name == installer::kChromeChannelDev ||
channel_name == base::ASCIIToUTF16("beta") || channel_name == installer::kChromeChannelBeta ||
channel_name == GoogleChromeSxSDistribution::ChannelName()) channel_name == GoogleChromeSxSDistribution::ChannelName());
return true;
return false;
} }
int ChromeBreakpadClient::GetResultCodeRespawnFailed() { int ChromeBreakpadClient::GetResultCodeRespawnFailed() {
...@@ -280,7 +277,7 @@ bool ChromeBreakpadClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { ...@@ -280,7 +277,7 @@ bool ChromeBreakpadClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false; return false;
} }
#endif #endif // defined(OS_WIN)
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
void ChromeBreakpadClient::GetProductNameAndVersion(std::string* product_name, void ChromeBreakpadClient::GetProductNameAndVersion(std::string* product_name,
......
...@@ -167,9 +167,9 @@ bool GetChromeChannelInternal(bool system_install, ...@@ -167,9 +167,9 @@ bool GetChromeChannelInternal(bool system_install,
// Tag the channel name if this is a multi-install. // Tag the channel name if this is a multi-install.
if (add_multi_modifier && channel_info.IsMultiInstall()) { if (add_multi_modifier && channel_info.IsMultiInstall()) {
if (!channel->empty()) { if (!channel->empty()) {
channel->append(1, L'-'); channel->push_back(L'-');
} }
channel->append(1, L'm'); channel->push_back(L'm');
} }
return true; return true;
...@@ -409,8 +409,8 @@ bool GoogleUpdateSettings::UpdateDidRunStateForDistribution( ...@@ -409,8 +409,8 @@ bool GoogleUpdateSettings::UpdateDidRunStateForDistribution(
system_level); system_level);
} }
std::wstring GoogleUpdateSettings::GetChromeChannel(bool system_install) { base::string16 GoogleUpdateSettings::GetChromeChannel(bool system_install) {
std::wstring channel; base::string16 channel;
GetChromeChannelInternal(system_install, false, &channel); GetChromeChannelInternal(system_install, false, &channel);
return channel; return channel;
} }
......
...@@ -167,7 +167,7 @@ class GoogleUpdateSettings { ...@@ -167,7 +167,7 @@ class GoogleUpdateSettings {
// Returns only the channel name: "" (stable), "dev", "beta", "canary", or // Returns only the channel name: "" (stable), "dev", "beta", "canary", or
// "unknown" if unknown. This value will not be modified by "-m" for a // "unknown" if unknown. This value will not be modified by "-m" for a
// multi-install. See kChromeChannel* in util_constants.h // multi-install. See kChromeChannel* in util_constants.h
static std::wstring GetChromeChannel(bool system_install); static base::string16 GetChromeChannel(bool system_install);
// Return a human readable modifier for the version string, e.g. // Return a human readable modifier for the version string, e.g.
// the channel (dev, beta, stable). Returns true if this operation succeeded, // the channel (dev, beta, stable). Returns true if this operation succeeded,
......
...@@ -10,11 +10,8 @@ ...@@ -10,11 +10,8 @@
#include "chrome/installer/util/master_preferences.h" #include "chrome/installer/util/master_preferences.h"
#include <windows.h>
#include "base/logging.h" #include "base/logging.h"
#include "base/values.h" #include "base/values.h"
#include "url/gurl.h"
namespace installer { namespace installer {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment