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 @@
#include "base/win/registry.h"
#include "chrome/installer/util/google_chrome_sxs_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/util_constants.h"
#include "policy/policy_constants.h"
#endif
......@@ -126,10 +127,8 @@ void ChromeBreakpadClient::GetProductNameAndVersion(
*version = base::ASCIIToUTF16("0.0.0.0-devel");
}
std::wstring channel_string;
GoogleUpdateSettings::GetChromeChannelAndModifiers(
!GetIsPerUserInstall(exe_path), &channel_string);
*channel_name = base::WideToUTF16(channel_string);
!GetIsPerUserInstall(exe_path), channel_name);
}
bool ChromeBreakpadClient::ShouldShowRestartDialog(base::string16* title,
......@@ -185,15 +184,13 @@ bool ChromeBreakpadClient::GetIsPerUserInstall(const base::FilePath& exe_path) {
}
bool ChromeBreakpadClient::GetShouldDumpLargerDumps(bool is_per_user_install) {
base::string16 channel_name(base::WideToUTF16(
GoogleUpdateSettings::GetChromeChannel(!is_per_user_install)));
base::string16 channel_name =
GoogleUpdateSettings::GetChromeChannel(!is_per_user_install);
// Capture more detail in crash dumps for beta and dev channel builds.
if (channel_name == base::ASCIIToUTF16("dev") ||
channel_name == base::ASCIIToUTF16("beta") ||
channel_name == GoogleChromeSxSDistribution::ChannelName())
return true;
return false;
return (channel_name == installer::kChromeChannelDev ||
channel_name == installer::kChromeChannelBeta ||
channel_name == GoogleChromeSxSDistribution::ChannelName());
}
int ChromeBreakpadClient::GetResultCodeRespawnFailed() {
......@@ -280,7 +277,7 @@ bool ChromeBreakpadClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}
#endif
#endif // defined(OS_WIN)
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
void ChromeBreakpadClient::GetProductNameAndVersion(std::string* product_name,
......
......@@ -167,9 +167,9 @@ bool GetChromeChannelInternal(bool system_install,
// Tag the channel name if this is a multi-install.
if (add_multi_modifier && channel_info.IsMultiInstall()) {
if (!channel->empty()) {
channel->append(1, L'-');
channel->push_back(L'-');
}
channel->append(1, L'm');
channel->push_back(L'm');
}
return true;
......@@ -409,8 +409,8 @@ bool GoogleUpdateSettings::UpdateDidRunStateForDistribution(
system_level);
}
std::wstring GoogleUpdateSettings::GetChromeChannel(bool system_install) {
std::wstring channel;
base::string16 GoogleUpdateSettings::GetChromeChannel(bool system_install) {
base::string16 channel;
GetChromeChannelInternal(system_install, false, &channel);
return channel;
}
......
......@@ -167,7 +167,7 @@ class GoogleUpdateSettings {
// Returns only the channel name: "" (stable), "dev", "beta", "canary", or
// "unknown" if unknown. This value will not be modified by "-m" for a
// 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.
// the channel (dev, beta, stable). Returns true if this operation succeeded,
......
......@@ -10,11 +10,8 @@
#include "chrome/installer/util/master_preferences.h"
#include <windows.h>
#include "base/logging.h"
#include "base/values.h"
#include "url/gurl.h"
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