summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 16:54:47 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 16:54:47 +0000
commitacd1ba02ca6b614b6500928c737eb6e110912367 (patch)
tree3d00771f49a868871f384af5f15a0cf8d9a8e49a
parent0ff3cbb953b1bbc3eda7a641584320ff1ff0281f (diff)
downloadchromium_src-acd1ba02ca6b614b6500928c737eb6e110912367.zip
chromium_src-acd1ba02ca6b614b6500928c737eb6e110912367.tar.gz
chromium_src-acd1ba02ca6b614b6500928c737eb6e110912367.tar.bz2
Fix GetAppShortcutName to return a localized name for Chrome.
Fixes a regression introduced in r108297. std::wstring --> string16 in chrome/installer/util/browser_distribution.h and all of its descendants. BUG=None TEST=None Review URL: http://codereview.chromium.org/10246007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134543 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/util/browser_distribution.cc40
-rw-r--r--chrome/installer/util/browser_distribution.h42
-rw-r--r--chrome/installer/util/chrome_frame_distribution.cc42
-rw-r--r--chrome/installer/util/chrome_frame_distribution.h37
-rw-r--r--chrome/installer/util/chromium_binaries_distribution.cc56
-rw-r--r--chrome/installer/util/chromium_binaries_distribution.h32
-rw-r--r--chrome/installer/util/google_chrome_binaries_distribution.cc20
-rw-r--r--chrome/installer/util/google_chrome_binaries_distribution.h12
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc114
-rw-r--r--chrome/installer/util/google_chrome_distribution.h49
-rw-r--r--chrome/installer/util/google_chrome_distribution_dummy.cc71
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.cc16
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.h15
13 files changed, 278 insertions, 268 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index 65b8348..a441d65 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -132,43 +132,43 @@ BrowserDistribution* BrowserDistribution::GetSpecificDistribution(
void BrowserDistribution::DoPostUninstallOperations(
const Version& version, const FilePath& local_data_path,
- const std::wstring& distribution_data) {
+ const string16& distribution_data) {
}
-std::wstring BrowserDistribution::GetAppGuid() {
+string16 BrowserDistribution::GetAppGuid() {
return L"";
}
-std::wstring BrowserDistribution::GetApplicationName() {
+string16 BrowserDistribution::GetApplicationName() {
return L"Chromium";
}
-std::wstring BrowserDistribution::GetAppShortCutName() {
+string16 BrowserDistribution::GetAppShortCutName() {
return GetApplicationName();
}
-std::wstring BrowserDistribution::GetAlternateApplicationName() {
+string16 BrowserDistribution::GetAlternateApplicationName() {
return L"The Internet";
}
-std::wstring BrowserDistribution::GetBrowserAppId() {
+string16 BrowserDistribution::GetBrowserAppId() {
return L"Chromium";
}
-std::wstring BrowserDistribution::GetInstallSubDir() {
+string16 BrowserDistribution::GetInstallSubDir() {
return L"Chromium";
}
-std::wstring BrowserDistribution::GetPublisherName() {
+string16 BrowserDistribution::GetPublisherName() {
return L"Chromium";
}
-std::wstring BrowserDistribution::GetAppDescription() {
+string16 BrowserDistribution::GetAppDescription() {
return L"Browse the web";
}
-std::wstring BrowserDistribution::GetLongAppDescription() {
- const std::wstring& app_description =
+string16 BrowserDistribution::GetLongAppDescription() {
+ const string16& app_description =
installer::GetLocalizedString(IDS_PRODUCT_DESCRIPTION_BASE);
return app_description;
}
@@ -177,15 +177,15 @@ std::string BrowserDistribution::GetSafeBrowsingName() {
return "chromium";
}
-std::wstring BrowserDistribution::GetStateKey() {
+string16 BrowserDistribution::GetStateKey() {
return L"Software\\Chromium";
}
-std::wstring BrowserDistribution::GetStateMediumKey() {
+string16 BrowserDistribution::GetStateMediumKey() {
return L"Software\\Chromium";
}
-std::wstring BrowserDistribution::GetStatsServerURL() {
+string16 BrowserDistribution::GetStatsServerURL() {
return L"";
}
@@ -197,19 +197,19 @@ std::string BrowserDistribution::GetHttpPipeliningTestServer() const {
return "";
}
-std::wstring BrowserDistribution::GetDistributionData(HKEY root_key) {
+string16 BrowserDistribution::GetDistributionData(HKEY root_key) {
return L"";
}
-std::wstring BrowserDistribution::GetUninstallLinkName() {
+string16 BrowserDistribution::GetUninstallLinkName() {
return L"Uninstall Chromium";
}
-std::wstring BrowserDistribution::GetUninstallRegPath() {
+string16 BrowserDistribution::GetUninstallRegPath() {
return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Chromium";
}
-std::wstring BrowserDistribution::GetVersionKey() {
+string16 BrowserDistribution::GetVersionKey() {
return L"Software\\Chromium";
}
@@ -225,7 +225,7 @@ int BrowserDistribution::GetIconIndex() {
return 0;
}
-bool BrowserDistribution::GetChromeChannel(std::wstring* channel) {
+bool BrowserDistribution::GetChromeChannel(string16* channel) {
return false;
}
@@ -256,7 +256,7 @@ void BrowserDistribution::LaunchUserExperiment(
void BrowserDistribution::InactiveUserToastExperiment(int flavor,
- const std::wstring& experiment_group,
+ const string16& experiment_group,
const installer::Product& installation,
const FilePath& application_path) {
}
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index db4020d..894fc465 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -9,10 +9,10 @@
#pragma once
#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/string16.h"
#include "base/version.h"
#include "chrome/installer/util/util_constants.h"
@@ -37,7 +37,7 @@ class BrowserDistribution {
// experiments we show toasts to the user if they are inactive for a certain
// amount of time.
struct UserExperiment {
- std::wstring prefix; // The experiment code prefix for this experiment,
+ string16 prefix; // The experiment code prefix for this experiment,
// also known as the 'TV' part in 'TV80'.
int flavor; // The flavor index for this experiment.
int heading; // The heading resource ID to use for this experiment.
@@ -63,50 +63,50 @@ class BrowserDistribution {
virtual void DoPostUninstallOperations(const Version& version,
const FilePath& local_data_path,
- const std::wstring& distribution_data);
+ const string16& distribution_data);
- virtual std::wstring GetAppGuid();
+ virtual string16 GetAppGuid();
// Returns the name by which the program is registered with Default Programs.
// This is not a localized string suitable for presenting to a user.
- virtual std::wstring GetApplicationName();
+ virtual string16 GetApplicationName();
// Returns the localized name of the program.
- virtual std::wstring GetAppShortCutName();
+ virtual string16 GetAppShortCutName();
- virtual std::wstring GetAlternateApplicationName();
+ virtual string16 GetAlternateApplicationName();
- virtual std::wstring GetBrowserAppId();
+ virtual string16 GetBrowserAppId();
- virtual std::wstring GetInstallSubDir();
+ virtual string16 GetInstallSubDir();
- virtual std::wstring GetPublisherName();
+ virtual string16 GetPublisherName();
- virtual std::wstring GetAppDescription();
+ virtual string16 GetAppDescription();
- virtual std::wstring GetLongAppDescription();
+ virtual string16 GetLongAppDescription();
virtual std::string GetSafeBrowsingName();
- virtual std::wstring GetStateKey();
+ virtual string16 GetStateKey();
- virtual std::wstring GetStateMediumKey();
+ virtual string16 GetStateMediumKey();
- virtual std::wstring GetStatsServerURL();
+ virtual string16 GetStatsServerURL();
virtual std::string GetNetworkStatsServer() const;
virtual std::string GetHttpPipeliningTestServer() const;
#if defined(OS_WIN)
- virtual std::wstring GetDistributionData(HKEY root_key);
+ virtual string16 GetDistributionData(HKEY root_key);
#endif
- virtual std::wstring GetUninstallLinkName();
+ virtual string16 GetUninstallLinkName();
- virtual std::wstring GetUninstallRegPath();
+ virtual string16 GetUninstallRegPath();
- virtual std::wstring GetVersionKey();
+ virtual string16 GetVersionKey();
virtual bool CanSetAsDefault();
@@ -114,7 +114,7 @@ class BrowserDistribution {
virtual int GetIconIndex();
- virtual bool GetChromeChannel(std::wstring* channel);
+ virtual bool GetChromeChannel(string16* channel);
// Returns true if the distribution includes a DelegateExecute verb handler,
// and provides the COM registration data if so:
@@ -152,7 +152,7 @@ class BrowserDistribution {
// The user has qualified for the inactive user toast experiment and this
// function just performs it.
virtual void InactiveUserToastExperiment(int flavor,
- const std::wstring& experiment_group,
+ const string16& experiment_group,
const installer::Product& installation,
const FilePath& application_path);
diff --git a/chrome/installer/util/chrome_frame_distribution.cc b/chrome/installer/util/chrome_frame_distribution.cc
index efa4c3b..8be7d49 100644
--- a/chrome/installer/util/chrome_frame_distribution.cc
+++ b/chrome/installer/util/chrome_frame_distribution.cc
@@ -9,8 +9,6 @@
#include "chrome/installer/util/chrome_frame_distribution.h"
-#include <string>
-
#include "base/string_util.h"
#include "chrome/common/net/test_server_locations.h"
#include "chrome/installer/util/channel_info.h"
@@ -30,41 +28,41 @@ ChromeFrameDistribution::ChromeFrameDistribution()
: BrowserDistribution(CHROME_FRAME) {
}
-std::wstring ChromeFrameDistribution::GetAppGuid() {
+string16 ChromeFrameDistribution::GetAppGuid() {
return kChromeFrameGuid;
}
-std::wstring ChromeFrameDistribution::GetApplicationName() {
+string16 ChromeFrameDistribution::GetApplicationName() {
return L"Google Chrome Frame";
}
-std::wstring ChromeFrameDistribution::GetAppShortCutName() {
- const std::wstring& product_name =
+string16 ChromeFrameDistribution::GetAppShortCutName() {
+ const string16& product_name =
installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE);
return product_name;
}
-std::wstring ChromeFrameDistribution::GetAlternateApplicationName() {
- const std::wstring& product_name =
+string16 ChromeFrameDistribution::GetAlternateApplicationName() {
+ const string16& product_name =
installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE);
return product_name;
}
-std::wstring ChromeFrameDistribution::GetInstallSubDir() {
+string16 ChromeFrameDistribution::GetInstallSubDir() {
return L"Google\\Chrome Frame";
}
-std::wstring ChromeFrameDistribution::GetPublisherName() {
- const std::wstring& publisher_name =
+string16 ChromeFrameDistribution::GetPublisherName() {
+ const string16& publisher_name =
installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
return publisher_name;
}
-std::wstring ChromeFrameDistribution::GetAppDescription() {
+string16 ChromeFrameDistribution::GetAppDescription() {
return L"Chrome in a Frame.";
}
-std::wstring ChromeFrameDistribution::GetLongAppDescription() {
+string16 ChromeFrameDistribution::GetLongAppDescription() {
return L"Chrome in a Frame.";
}
@@ -72,21 +70,21 @@ std::string ChromeFrameDistribution::GetSafeBrowsingName() {
return "googlechromeframe";
}
-std::wstring ChromeFrameDistribution::GetStateKey() {
- std::wstring key(google_update::kRegPathClientState);
+string16 ChromeFrameDistribution::GetStateKey() {
+ string16 key(google_update::kRegPathClientState);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
}
-std::wstring ChromeFrameDistribution::GetStateMediumKey() {
- std::wstring key(google_update::kRegPathClientStateMedium);
+string16 ChromeFrameDistribution::GetStateMediumKey() {
+ string16 key(google_update::kRegPathClientStateMedium);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
}
-std::wstring ChromeFrameDistribution::GetStatsServerURL() {
+string16 ChromeFrameDistribution::GetStatsServerURL() {
return L"https://clients4.google.com/firefox/metrics/collect";
}
@@ -98,17 +96,17 @@ std::string ChromeFrameDistribution::GetHttpPipeliningTestServer() const {
return chrome_common_net::kPipelineTestServerBaseUrl;
}
-std::wstring ChromeFrameDistribution::GetUninstallLinkName() {
+string16 ChromeFrameDistribution::GetUninstallLinkName() {
return L"Uninstall Chrome Frame";
}
-std::wstring ChromeFrameDistribution::GetUninstallRegPath() {
+string16 ChromeFrameDistribution::GetUninstallRegPath() {
return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
L"Google Chrome Frame";
}
-std::wstring ChromeFrameDistribution::GetVersionKey() {
- std::wstring key(google_update::kRegPathClients);
+string16 ChromeFrameDistribution::GetVersionKey() {
+ string16 key(google_update::kRegPathClients);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
diff --git a/chrome/installer/util/chrome_frame_distribution.h b/chrome/installer/util/chrome_frame_distribution.h
index d7b1275..1596db4 100644
--- a/chrome/installer/util/chrome_frame_distribution.h
+++ b/chrome/installer/util/chrome_frame_distribution.h
@@ -9,56 +9,53 @@
#define CHROME_INSTALLER_UTIL_CHROME_FRAME_DISTRIBUTION_H_
#pragma once
-#include <string>
-#include <vector>
-
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/util_constants.h"
class ChromeFrameDistribution : public BrowserDistribution {
public:
- virtual std::wstring GetAppGuid() OVERRIDE;
+ virtual string16 GetAppGuid() OVERRIDE;
- virtual std::wstring GetApplicationName() OVERRIDE;
+ virtual string16 GetApplicationName() OVERRIDE;
- virtual std::wstring GetAppShortCutName() OVERRIDE;
+ virtual string16 GetAppShortCutName() OVERRIDE;
- virtual std::wstring GetAlternateApplicationName() OVERRIDE;
+ virtual string16 GetAlternateApplicationName() OVERRIDE;
- virtual std::wstring GetInstallSubDir() OVERRIDE;
+ virtual string16 GetInstallSubDir() OVERRIDE;
- virtual std::wstring GetPublisherName() OVERRIDE;
+ virtual string16 GetPublisherName() OVERRIDE;
- virtual std::wstring GetAppDescription() OVERRIDE;
+ virtual string16 GetAppDescription() OVERRIDE;
- virtual std::wstring GetLongAppDescription() OVERRIDE;
+ virtual string16 GetLongAppDescription() OVERRIDE;
virtual std::string GetSafeBrowsingName() OVERRIDE;
- virtual std::wstring GetStateKey() OVERRIDE;
+ virtual string16 GetStateKey() OVERRIDE;
- virtual std::wstring GetStateMediumKey() OVERRIDE;
+ virtual string16 GetStateMediumKey() OVERRIDE;
- virtual std::wstring GetStatsServerURL() OVERRIDE;
+ virtual string16 GetStatsServerURL() OVERRIDE;
virtual std::string GetNetworkStatsServer() const OVERRIDE;
virtual std::string GetHttpPipeliningTestServer() const OVERRIDE;
- virtual std::wstring GetUninstallLinkName() OVERRIDE;
+ virtual string16 GetUninstallLinkName() OVERRIDE;
- virtual std::wstring GetUninstallRegPath() OVERRIDE;
+ virtual string16 GetUninstallRegPath() OVERRIDE;
- virtual std::wstring GetVersionKey() OVERRIDE;
+ virtual string16 GetVersionKey() OVERRIDE;
virtual bool CanSetAsDefault() OVERRIDE;
virtual bool CanCreateDesktopShortcuts() OVERRIDE;
virtual bool GetDelegateExecuteHandlerData(string16* handler_class_uuid,
- string16* type_lib_uuid,
- string16* type_lib_version,
- string16* interface_uuid) OVERRIDE;
+ string16* type_lib_uuid,
+ string16* type_lib_version,
+ string16* interface_uuid) OVERRIDE;
virtual void UpdateInstallStatus(bool system_install,
installer::ArchiveType archive_type,
diff --git a/chrome/installer/util/chromium_binaries_distribution.cc b/chrome/installer/util/chromium_binaries_distribution.cc
index de57e0d..0e073be 100644
--- a/chrome/installer/util/chromium_binaries_distribution.cc
+++ b/chrome/installer/util/chromium_binaries_distribution.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -20,46 +20,46 @@ ChromiumBinariesDistribution::ChromiumBinariesDistribution()
BrowserDistribution::GetSpecificDistribution(CHROME_BROWSER)) {
}
-std::wstring ChromiumBinariesDistribution::GetAppGuid() {
- return std::wstring();
+string16 ChromiumBinariesDistribution::GetAppGuid() {
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetApplicationName() {
+string16 ChromiumBinariesDistribution::GetApplicationName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetAppShortCutName() {
+string16 ChromiumBinariesDistribution::GetAppShortCutName() {
return kChromiumBinariesName;
}
-std::wstring ChromiumBinariesDistribution::GetAlternateApplicationName() {
+string16 ChromiumBinariesDistribution::GetAlternateApplicationName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetBrowserAppId() {
+string16 ChromiumBinariesDistribution::GetBrowserAppId() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetInstallSubDir() {
+string16 ChromiumBinariesDistribution::GetInstallSubDir() {
return browser_distribution_->GetInstallSubDir();
}
-std::wstring ChromiumBinariesDistribution::GetPublisherName() {
+string16 ChromiumBinariesDistribution::GetPublisherName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetAppDescription() {
+string16 ChromiumBinariesDistribution::GetAppDescription() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetLongAppDescription() {
+string16 ChromiumBinariesDistribution::GetLongAppDescription() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
std::string ChromiumBinariesDistribution::GetSafeBrowsingName() {
@@ -67,26 +67,26 @@ std::string ChromiumBinariesDistribution::GetSafeBrowsingName() {
return std::string();
}
-std::wstring ChromiumBinariesDistribution::GetStateKey() {
- return std::wstring(L"Software\\").append(kChromiumBinariesName);
+string16 ChromiumBinariesDistribution::GetStateKey() {
+ return string16(L"Software\\").append(kChromiumBinariesName);
}
-std::wstring ChromiumBinariesDistribution::GetStateMediumKey() {
- return std::wstring(L"Software\\").append(kChromiumBinariesName);
+string16 ChromiumBinariesDistribution::GetStateMediumKey() {
+ return string16(L"Software\\").append(kChromiumBinariesName);
}
-std::wstring ChromiumBinariesDistribution::GetUninstallLinkName() {
+string16 ChromiumBinariesDistribution::GetUninstallLinkName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetUninstallRegPath() {
+string16 ChromiumBinariesDistribution::GetUninstallRegPath() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring ChromiumBinariesDistribution::GetVersionKey() {
- return std::wstring(L"Software\\").append(kChromiumBinariesName);
+string16 ChromiumBinariesDistribution::GetVersionKey() {
+ return string16(L"Software\\").append(kChromiumBinariesName);
}
bool ChromiumBinariesDistribution::CanSetAsDefault() {
@@ -99,7 +99,7 @@ int ChromiumBinariesDistribution::GetIconIndex() {
return 0;
}
-bool ChromiumBinariesDistribution::GetChromeChannel(std::wstring* channel) {
+bool ChromiumBinariesDistribution::GetChromeChannel(string16* channel) {
NOTREACHED();
return false;
}
diff --git a/chrome/installer/util/chromium_binaries_distribution.h b/chrome/installer/util/chromium_binaries_distribution.h
index 9fe7095..599cdc0 100644
--- a/chrome/installer/util/chromium_binaries_distribution.h
+++ b/chrome/installer/util/chromium_binaries_distribution.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -14,41 +14,41 @@
class ChromiumBinariesDistribution : public BrowserDistribution {
public:
- virtual std::wstring GetAppGuid() OVERRIDE;
+ virtual string16 GetAppGuid() OVERRIDE;
- virtual std::wstring GetApplicationName() OVERRIDE;
+ virtual string16 GetApplicationName() OVERRIDE;
- virtual std::wstring GetAppShortCutName() OVERRIDE;
+ virtual string16 GetAppShortCutName() OVERRIDE;
- virtual std::wstring GetAlternateApplicationName() OVERRIDE;
+ virtual string16 GetAlternateApplicationName() OVERRIDE;
- virtual std::wstring GetBrowserAppId() OVERRIDE;
+ virtual string16 GetBrowserAppId() OVERRIDE;
- virtual std::wstring GetInstallSubDir() OVERRIDE;
+ virtual string16 GetInstallSubDir() OVERRIDE;
- virtual std::wstring GetPublisherName() OVERRIDE;
+ virtual string16 GetPublisherName() OVERRIDE;
- virtual std::wstring GetAppDescription() OVERRIDE;
+ virtual string16 GetAppDescription() OVERRIDE;
- virtual std::wstring GetLongAppDescription() OVERRIDE;
+ virtual string16 GetLongAppDescription() OVERRIDE;
virtual std::string GetSafeBrowsingName() OVERRIDE;
- virtual std::wstring GetStateKey() OVERRIDE;
+ virtual string16 GetStateKey() OVERRIDE;
- virtual std::wstring GetStateMediumKey() OVERRIDE;
+ virtual string16 GetStateMediumKey() OVERRIDE;
- virtual std::wstring GetUninstallLinkName() OVERRIDE;
+ virtual string16 GetUninstallLinkName() OVERRIDE;
- virtual std::wstring GetUninstallRegPath() OVERRIDE;
+ virtual string16 GetUninstallRegPath() OVERRIDE;
- virtual std::wstring GetVersionKey() OVERRIDE;
+ virtual string16 GetVersionKey() OVERRIDE;
virtual bool CanSetAsDefault() OVERRIDE;
virtual int GetIconIndex() OVERRIDE;
- virtual bool GetChromeChannel(std::wstring* channel) OVERRIDE;
+ virtual bool GetChromeChannel(string16* channel) OVERRIDE;
protected:
friend class BrowserDistribution;
diff --git a/chrome/installer/util/google_chrome_binaries_distribution.cc b/chrome/installer/util/google_chrome_binaries_distribution.cc
index d5b6d24..16c177d 100644
--- a/chrome/installer/util/google_chrome_binaries_distribution.cc
+++ b/chrome/installer/util/google_chrome_binaries_distribution.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// This file declares a class that contains various method related to branding.
+// This file defines a class that contains various method related to branding.
#include "chrome/installer/util/google_chrome_binaries_distribution.h"
@@ -21,28 +21,28 @@ GoogleChromeBinariesDistribution::GoogleChromeBinariesDistribution()
: ChromiumBinariesDistribution() {
}
-std::wstring GoogleChromeBinariesDistribution::GetAppGuid() {
+string16 GoogleChromeBinariesDistribution::GetAppGuid() {
return kChromeBinariesGuid;
}
-std::wstring GoogleChromeBinariesDistribution::GetAppShortCutName() {
+string16 GoogleChromeBinariesDistribution::GetAppShortCutName() {
return kChromeBinariesName;
}
-std::wstring GoogleChromeBinariesDistribution::GetStateKey() {
- return std::wstring(google_update::kRegPathClientState)
+string16 GoogleChromeBinariesDistribution::GetStateKey() {
+ return string16(google_update::kRegPathClientState)
.append(1, L'\\')
.append(kChromeBinariesGuid);
}
-std::wstring GoogleChromeBinariesDistribution::GetStateMediumKey() {
- return std::wstring(google_update::kRegPathClientStateMedium)
+string16 GoogleChromeBinariesDistribution::GetStateMediumKey() {
+ return string16(google_update::kRegPathClientStateMedium)
.append(1, L'\\')
.append(kChromeBinariesGuid);
}
-std::wstring GoogleChromeBinariesDistribution::GetVersionKey() {
- return std::wstring(google_update::kRegPathClients)
+string16 GoogleChromeBinariesDistribution::GetVersionKey() {
+ return string16(google_update::kRegPathClients)
.append(1, L'\\')
.append(kChromeBinariesGuid);
}
diff --git a/chrome/installer/util/google_chrome_binaries_distribution.h b/chrome/installer/util/google_chrome_binaries_distribution.h
index 05de929..6db057c 100644
--- a/chrome/installer/util/google_chrome_binaries_distribution.h
+++ b/chrome/installer/util/google_chrome_binaries_distribution.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -12,15 +12,15 @@
class GoogleChromeBinariesDistribution : public ChromiumBinariesDistribution {
public:
- virtual std::wstring GetAppGuid();
+ virtual string16 GetAppGuid();
- virtual std::wstring GetAppShortCutName();
+ virtual string16 GetAppShortCutName();
- virtual std::wstring GetStateKey();
+ virtual string16 GetStateKey();
- virtual std::wstring GetStateMediumKey();
+ virtual string16 GetStateMediumKey();
- virtual std::wstring GetVersionKey();
+ virtual string16 GetVersionKey();
virtual void UpdateInstallStatus(bool system_install,
installer::ArchiveType archive_type,
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 2c91adf..b11942b 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -7,6 +7,7 @@
#include "chrome/installer/util/google_chrome_distribution.h"
+#include <vector>
#include <windows.h>
#include <wtsapi32.h>
#include <msi.h>
@@ -71,20 +72,20 @@ const wchar_t kToastExpBaseGroup[] = L"80";
// Substitute the locale parameter in uninstall URL with whatever
// Google Update tells us is the locale. In case we fail to find
// the locale, we use US English.
-std::wstring LocalizeUrl(const wchar_t* url) {
- std::wstring language;
+string16 LocalizeUrl(const wchar_t* url) {
+ string16 language;
if (!GoogleUpdateSettings::GetLanguage(&language))
language = L"en-US"; // Default to US English.
return ReplaceStringPlaceholders(url, language.c_str(), NULL);
}
-std::wstring GetUninstallSurveyUrl() {
+string16 GetUninstallSurveyUrl() {
const wchar_t kSurveyUrl[] = L"http://www.google.com/support/chrome/bin/"
L"request.py?hl=$1&contact_type=uninstall";
return LocalizeUrl(kSurveyUrl);
}
-std::wstring GetWelcomeBackUrl() {
+string16 GetWelcomeBackUrl() {
const wchar_t kWelcomeUrl[] = L"http://www.google.com/chrome/intl/$1/"
L"welcomeback-new.html";
return LocalizeUrl(kWelcomeUrl);
@@ -196,7 +197,7 @@ bool FixDACLsForExecute(const FilePath& exe) {
if (!::ConvertSecurityDescriptorToStringSecurityDescriptorW(sd,
SDDL_REVISION_1, DACL_SECURITY_INFORMATION, &sddl, NULL))
return false;
- std::wstring new_sddl(sddl);
+ string16 new_sddl(sddl);
::LocalFree(sddl);
sd = NULL;
// See MSDN for the security descriptor definition language (SDDL) syntax,
@@ -205,12 +206,12 @@ bool FixDACLsForExecute(const FilePath& exe) {
const wchar_t kAllowACE[] = L"(A;;GRGX;;;AU)";
// We should check that there are no special ACES for the group we
// are interested, which is nt\authenticated_users.
- if (std::wstring::npos != new_sddl.find(L";AU)"))
+ if (string16::npos != new_sddl.find(L";AU)"))
return false;
// Specific ACEs (not inherited) need to go to the front. It is ok if we
// are the very first one.
size_t pos_insert = new_sddl.find(L"(");
- if (std::wstring::npos == pos_insert)
+ if (string16::npos == pos_insert)
return false;
// All good, time to change the dacl.
new_sddl.insert(pos_insert, kAllowACE);
@@ -297,7 +298,7 @@ GoogleChromeDistribution::GoogleChromeDistribution()
// see the comment in google_chrome_distribution_dummy.cc
#ifndef _WIN64
bool GoogleChromeDistribution::BuildUninstallMetricsString(
- DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) {
+ DictionaryValue* uninstall_metrics_dict, string16* metrics) {
DCHECK(NULL != metrics);
bool has_values = false;
@@ -318,7 +319,7 @@ bool GoogleChromeDistribution::BuildUninstallMetricsString(
bool GoogleChromeDistribution::ExtractUninstallMetricsFromFile(
const FilePath& file_path,
- std::wstring* uninstall_metrics_string) {
+ string16* uninstall_metrics_string) {
JSONFileValueSerializer json_serializer(file_path);
std::string json_error_string;
@@ -335,7 +336,8 @@ bool GoogleChromeDistribution::ExtractUninstallMetricsFromFile(
}
bool GoogleChromeDistribution::ExtractUninstallMetrics(
- const DictionaryValue& root, std::wstring* uninstall_metrics_string) {
+ const DictionaryValue& root,
+ string16* uninstall_metrics_string) {
// Make sure that the user wants us reporting metrics. If not, don't
// add our uninstall metrics.
bool metrics_reporting_enabled = false;
@@ -364,7 +366,7 @@ bool GoogleChromeDistribution::ExtractUninstallMetrics(
void GoogleChromeDistribution::DoPostUninstallOperations(
const Version& version,
const FilePath& local_data_path,
- const std::wstring& distribution_data) {
+ const string16& distribution_data) {
// Send the Chrome version and OS version as params to the form.
// It would be nice to send the locale, too, but I don't see an
// easy way to get that in the existing code. It's something we
@@ -372,11 +374,11 @@ void GoogleChromeDistribution::DoPostUninstallOperations(
// We depend on installed_version.GetString() not having spaces or other
// characters that need escaping: 0.2.13.4. Should that change, we will
// need to escape the string before using it in a URL.
- const std::wstring kVersionParam = L"crversion";
- const std::wstring kOSParam = L"os";
+ const string16 kVersionParam = L"crversion";
+ const string16 kOSParam = L"os";
base::win::OSInfo::VersionNumber version_number =
base::win::OSInfo::GetInstance()->version_number();
- std::wstring os_version = base::StringPrintf(L"%d.%d.%d",
+ string16 os_version = base::StringPrintf(L"%d.%d.%d",
version_number.major, version_number.minor, version_number.build);
FilePath iexplore;
@@ -386,11 +388,11 @@ void GoogleChromeDistribution::DoPostUninstallOperations(
iexplore = iexplore.AppendASCII("Internet Explorer");
iexplore = iexplore.AppendASCII("iexplore.exe");
- std::wstring command = iexplore.value() + L" " + GetUninstallSurveyUrl() +
+ string16 command = iexplore.value() + L" " + GetUninstallSurveyUrl() +
L"&" + kVersionParam + L"=" + UTF8ToWide(version.GetString()) + L"&" +
kOSParam + L"=" + os_version;
- std::wstring uninstall_metrics;
+ string16 uninstall_metrics;
if (ExtractUninstallMetricsFromFile(local_data_path, &uninstall_metrics)) {
// The user has opted into anonymous usage data collection, so append
// metrics and distribution data.
@@ -409,42 +411,48 @@ void GoogleChromeDistribution::DoPostUninstallOperations(
installer::WMIProcess::Launch(command, &pid);
}
-std::wstring GoogleChromeDistribution::GetAppGuid() {
+string16 GoogleChromeDistribution::GetAppGuid() {
return product_guid();
}
-std::wstring GoogleChromeDistribution::GetApplicationName() {
+string16 GoogleChromeDistribution::GetApplicationName() {
// I'd really like to return L ## PRODUCT_FULLNAME_STRING; but that's no good
// since it'd be "Chromium" in a non-Chrome build, which isn't at all what I
// want. Sigh.
return L"Google Chrome";
}
-std::wstring GoogleChromeDistribution::GetAlternateApplicationName() {
- const std::wstring& alt_product_name =
+string16 GoogleChromeDistribution::GetAppShortCutName() {
+ const string16& app_shortcut_name =
+ installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE);
+ return app_shortcut_name;
+}
+
+string16 GoogleChromeDistribution::GetAlternateApplicationName() {
+ const string16& alt_product_name =
installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE);
return alt_product_name;
}
-std::wstring GoogleChromeDistribution::GetBrowserAppId() {
+string16 GoogleChromeDistribution::GetBrowserAppId() {
return kBrowserAppId;
}
-std::wstring GoogleChromeDistribution::GetInstallSubDir() {
- std::wstring sub_dir(installer::kGoogleChromeInstallSubDir1);
+string16 GoogleChromeDistribution::GetInstallSubDir() {
+ string16 sub_dir(installer::kGoogleChromeInstallSubDir1);
sub_dir.append(L"\\");
sub_dir.append(installer::kGoogleChromeInstallSubDir2);
return sub_dir;
}
-std::wstring GoogleChromeDistribution::GetPublisherName() {
- const std::wstring& publisher_name =
+string16 GoogleChromeDistribution::GetPublisherName() {
+ const string16& publisher_name =
installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
return publisher_name;
}
-std::wstring GoogleChromeDistribution::GetAppDescription() {
- const std::wstring& app_description =
+string16 GoogleChromeDistribution::GetAppDescription() {
+ const string16& app_description =
installer::GetLocalizedString(IDS_SHORTCUT_TOOLTIP_BASE);
return app_description;
}
@@ -453,21 +461,21 @@ std::string GoogleChromeDistribution::GetSafeBrowsingName() {
return "googlechrome";
}
-std::wstring GoogleChromeDistribution::GetStateKey() {
- std::wstring key(google_update::kRegPathClientState);
+string16 GoogleChromeDistribution::GetStateKey() {
+ string16 key(google_update::kRegPathClientState);
key.append(L"\\");
key.append(product_guid());
return key;
}
-std::wstring GoogleChromeDistribution::GetStateMediumKey() {
- std::wstring key(google_update::kRegPathClientStateMedium);
+string16 GoogleChromeDistribution::GetStateMediumKey() {
+ string16 key(google_update::kRegPathClientStateMedium);
key.append(L"\\");
key.append(product_guid());
return key;
}
-std::wstring GoogleChromeDistribution::GetStatsServerURL() {
+string16 GoogleChromeDistribution::GetStatsServerURL() {
return L"https://clients4.google.com/firefox/metrics/collect";
}
@@ -479,14 +487,14 @@ std::string GoogleChromeDistribution::GetHttpPipeliningTestServer() const {
return chrome_common_net::kPipelineTestServerBaseUrl;
}
-std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
- std::wstring sub_key(google_update::kRegPathClientState);
+string16 GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
+ string16 sub_key(google_update::kRegPathClientState);
sub_key.append(L"\\");
sub_key.append(product_guid());
base::win::RegKey client_state_key(root_key, sub_key.c_str(), KEY_READ);
- std::wstring result;
- std::wstring brand_value;
+ string16 result;
+ string16 brand_value;
if (client_state_key.ReadValue(google_update::kRegRLZBrandField,
&brand_value) == ERROR_SUCCESS) {
result = google_update::kRegRLZBrandField;
@@ -495,7 +503,7 @@ std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
result.append(L"&");
}
- std::wstring client_value;
+ string16 client_value;
if (client_state_key.ReadValue(google_update::kRegClientField,
&client_value) == ERROR_SUCCESS) {
result.append(google_update::kRegClientField);
@@ -504,7 +512,7 @@ std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
result.append(L"&");
}
- std::wstring ap_value;
+ string16 ap_value;
// If we fail to read the ap key, send up "&ap=" anyway to indicate
// that this was probably a stable channel release.
client_state_key.ReadValue(google_update::kRegApField, &ap_value);
@@ -515,19 +523,19 @@ std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
return result;
}
-std::wstring GoogleChromeDistribution::GetUninstallLinkName() {
- const std::wstring& link_name =
+string16 GoogleChromeDistribution::GetUninstallLinkName() {
+ const string16& link_name =
installer::GetLocalizedString(IDS_UNINSTALL_CHROME_BASE);
return link_name;
}
-std::wstring GoogleChromeDistribution::GetUninstallRegPath() {
+string16 GoogleChromeDistribution::GetUninstallRegPath() {
return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
L"Google Chrome";
}
-std::wstring GoogleChromeDistribution::GetVersionKey() {
- std::wstring key(google_update::kRegPathClients);
+string16 GoogleChromeDistribution::GetVersionKey() {
+ string16 key(google_update::kRegPathClients);
key.append(L"\\");
key.append(product_guid());
return key;
@@ -576,7 +584,7 @@ void GoogleChromeDistribution::UpdateInstallStatus(bool system_install,
// command line, but HKCU otherwise. |experiment_group| is the value to write
// and |last_write| is used when writing to HKLM to determine whether to close
// the handle when done.
-void SetClient(const std::wstring& experiment_group, bool last_write) {
+void SetClient(const string16& experiment_group, bool last_write) {
static int reg_key_handle = -1;
if (reg_key_handle == -1) {
// If a specific Toast Results key handle (presumably to our HKLM key) was
@@ -644,8 +652,8 @@ bool GoogleChromeDistribution::GetExperimentDetails(
{kAll, kAll, 1, L'B', L'A', 1, {kEnUs3, 0, 0, 0} },
};
- std::wstring locale;
- std::wstring brand;
+ string16 locale;
+ string16 brand;
if (!GoogleUpdateSettings::GetLanguage(&locale))
locale = ASCIIToWide("en-US");
@@ -674,11 +682,11 @@ bool GoogleChromeDistribution::GetExperimentDetails(
kExperimentFlavors[i].locale != ASCIIToWide("*"))
continue;
- std::vector<std::wstring> brand_codes;
+ std::vector<string16> brand_codes;
base::SplitString(kExperimentFlavors[i].brands, L',', &brand_codes);
if (brand_codes.empty())
return false;
- for (std::vector<std::wstring>::iterator it = brand_codes.begin();
+ for (std::vector<string16>::iterator it = brand_codes.begin();
it != brand_codes.end(); ++it) {
if (*it != brand && *it != L"*")
continue;
@@ -740,9 +748,9 @@ void GoogleChromeDistribution::LaunchUserExperiment(
return;
}
int flavor = experiment.flavor;
- std::wstring base_group = experiment.prefix;
+ string16 base_group = experiment.prefix;
- std::wstring brand;
+ string16 brand;
if (GoogleUpdateSettings::GetBrand(&brand) && (brand == L"CHXX")) {
// Testing only: the user automatically qualifies for the experiment.
VLOG(1) << "Experiment qualification bypass";
@@ -797,7 +805,7 @@ void GoogleChromeDistribution::LaunchUserExperiment(
// User qualifies for the experiment. To test, use --try-chrome-again=|flavor|
// as a parameter to chrome.exe.
void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor,
- const std::wstring& experiment_group,
+ const string16& experiment_group,
const installer::Product& installation,
const FilePath& application_path) {
bool has_welcome_url = (flavor == 0);
@@ -807,12 +815,12 @@ void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor,
base::IntToString16(flavor));
if (has_welcome_url) {
// Prepend the url with a space.
- std::wstring url(GetWelcomeBackUrl());
+ string16 url(GetWelcomeBackUrl());
options.AppendArg("--");
options.AppendArgNative(url);
// The command line should now have the url added as:
// "chrome.exe -- <url>"
- DCHECK_NE(std::wstring::npos,
+ DCHECK_NE(string16::npos,
options.GetCommandLineString().find(L" -- " + url));
}
// Launch chrome now. It will show the toast UI.
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index 743bd38..4bc4381 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -9,8 +9,7 @@
#define CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_
#pragma once
-#include <string>
-
+#include "base/string16.h"
#include "base/gtest_prod_util.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/util_constants.h"
@@ -35,29 +34,31 @@ class GoogleChromeDistribution : public BrowserDistribution {
virtual void DoPostUninstallOperations(
const Version& version,
const FilePath& local_data_path,
- const std::wstring& distribution_data) OVERRIDE;
+ const string16& distribution_data) OVERRIDE;
+
+ virtual string16 GetAppGuid() OVERRIDE;
- virtual std::wstring GetAppGuid() OVERRIDE;
+ virtual string16 GetApplicationName() OVERRIDE;
- virtual std::wstring GetApplicationName() OVERRIDE;
+ virtual string16 GetAppShortCutName() OVERRIDE;
- virtual std::wstring GetAlternateApplicationName() OVERRIDE;
+ virtual string16 GetAlternateApplicationName() OVERRIDE;
- virtual std::wstring GetBrowserAppId() OVERRIDE;
+ virtual string16 GetBrowserAppId() OVERRIDE;
- virtual std::wstring GetInstallSubDir() OVERRIDE;
+ virtual string16 GetInstallSubDir() OVERRIDE;
- virtual std::wstring GetPublisherName() OVERRIDE;
+ virtual string16 GetPublisherName() OVERRIDE;
- virtual std::wstring GetAppDescription() OVERRIDE;
+ virtual string16 GetAppDescription() OVERRIDE;
virtual std::string GetSafeBrowsingName() OVERRIDE;
- virtual std::wstring GetStateKey() OVERRIDE;
+ virtual string16 GetStateKey() OVERRIDE;
- virtual std::wstring GetStateMediumKey() OVERRIDE;
+ virtual string16 GetStateMediumKey() OVERRIDE;
- virtual std::wstring GetStatsServerURL() OVERRIDE;
+ virtual string16 GetStatsServerURL() OVERRIDE;
virtual std::string GetNetworkStatsServer() const OVERRIDE;
@@ -66,13 +67,13 @@ class GoogleChromeDistribution : public BrowserDistribution {
// This method reads data from the Google Update ClientState key for
// potential use in the uninstall survey. It must be called before the
// key returned by GetVersionKey() is deleted.
- virtual std::wstring GetDistributionData(HKEY root_key) OVERRIDE;
+ virtual string16 GetDistributionData(HKEY root_key) OVERRIDE;
- virtual std::wstring GetUninstallLinkName() OVERRIDE;
+ virtual string16 GetUninstallLinkName() OVERRIDE;
- virtual std::wstring GetUninstallRegPath() OVERRIDE;
+ virtual string16 GetUninstallRegPath() OVERRIDE;
- virtual std::wstring GetVersionKey() OVERRIDE;
+ virtual string16 GetVersionKey() OVERRIDE;
virtual bool GetDelegateExecuteHandlerData(string16* handler_class_uuid,
string16* type_lib_uuid,
@@ -99,14 +100,14 @@ class GoogleChromeDistribution : public BrowserDistribution {
// outcome in the registry.
virtual void InactiveUserToastExperiment(
int flavor,
- const std::wstring& experiment_group,
+ const string16& experiment_group,
const installer::Product& installation,
const FilePath& application_path) OVERRIDE;
- const std::wstring& product_guid() { return product_guid_; }
+ const string16& product_guid() { return product_guid_; }
protected:
- void set_product_guid(const std::wstring& guid) { product_guid_ = guid; }
+ void set_product_guid(const string16& guid) { product_guid_ = guid; }
// Disallow construction from others.
GoogleChromeDistribution();
@@ -122,21 +123,21 @@ class GoogleChromeDistribution : public BrowserDistribution {
// Returns true if uninstall_metrics has been successfully populated with
// the uninstall metrics, false otherwise.
virtual bool ExtractUninstallMetricsFromFile(
- const FilePath& file_path, std::wstring* uninstall_metrics);
+ const FilePath& file_path, string16* uninstall_metrics);
// Extracts uninstall metrics from the given JSON value.
virtual bool ExtractUninstallMetrics(const base::DictionaryValue& root,
- std::wstring* uninstall_metrics);
+ string16* uninstall_metrics);
// Given a DictionaryValue containing a set of uninstall metrics,
// this builds a URL parameter list of all the contained metrics.
// Returns true if at least one uninstall metric was found in
// uninstall_metrics_dict, false otherwise.
virtual bool BuildUninstallMetricsString(
- base::DictionaryValue* uninstall_metrics_dict, std::wstring* metrics);
+ base::DictionaryValue* uninstall_metrics_dict, string16* metrics);
// The product ID for Google Update.
- std::wstring product_guid_;
+ string16 product_guid_;
};
#endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_
diff --git a/chrome/installer/util/google_chrome_distribution_dummy.cc b/chrome/installer/util/google_chrome_distribution_dummy.cc
index d3e8ff2..8cc9dac 100644
--- a/chrome/installer/util/google_chrome_distribution_dummy.cc
+++ b/chrome/installer/util/google_chrome_distribution_dummy.cc
@@ -23,42 +23,47 @@ GoogleChromeDistribution::GoogleChromeDistribution()
void GoogleChromeDistribution::DoPostUninstallOperations(
const Version& version,
const FilePath& local_data_path,
- const std::wstring& distribution_data) {
+ const string16& distribution_data) {
}
-std::wstring GoogleChromeDistribution::GetAppGuid() {
+string16 GoogleChromeDistribution::GetAppGuid() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetApplicationName() {
+string16 GoogleChromeDistribution::GetApplicationName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetAlternateApplicationName() {
+string16 GoogleChromeDistribution::GetAppShortCutName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetBrowserAppId() {
+string16 GoogleChromeDistribution::GetAlternateApplicationName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetInstallSubDir() {
+string16 GoogleChromeDistribution::GetBrowserAppId() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetPublisherName() {
+string16 GoogleChromeDistribution::GetInstallSubDir() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetAppDescription() {
+string16 GoogleChromeDistribution::GetPublisherName() {
NOTREACHED();
- return std::wstring();
+ return string16();
+}
+
+string16 GoogleChromeDistribution::GetAppDescription() {
+ NOTREACHED();
+ return string16();
}
std::string GoogleChromeDistribution::GetSafeBrowsingName() {
@@ -66,19 +71,19 @@ std::string GoogleChromeDistribution::GetSafeBrowsingName() {
return std::string();
}
-std::wstring GoogleChromeDistribution::GetStateKey() {
+string16 GoogleChromeDistribution::GetStateKey() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetStateMediumKey() {
+string16 GoogleChromeDistribution::GetStateMediumKey() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetStatsServerURL() {
+string16 GoogleChromeDistribution::GetStatsServerURL() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
std::string GoogleChromeDistribution::GetNetworkStatsServer() const {
@@ -91,24 +96,24 @@ std::string GoogleChromeDistribution::GetHttpPipeliningTestServer() const {
return std::string();
}
-std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
+string16 GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetUninstallLinkName() {
+string16 GoogleChromeDistribution::GetUninstallLinkName() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetUninstallRegPath() {
+string16 GoogleChromeDistribution::GetUninstallRegPath() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
-std::wstring GoogleChromeDistribution::GetVersionKey() {
+string16 GoogleChromeDistribution::GetVersionKey() {
NOTREACHED();
- return std::wstring();
+ return string16();
}
bool GoogleChromeDistribution::GetDelegateExecuteHandlerData(
@@ -141,26 +146,26 @@ void GoogleChromeDistribution::LaunchUserExperiment(
}
void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor,
- const std::wstring& experiment_group,
+ const string16& experiment_group,
const installer::Product& installation,
const FilePath& application_path) {
NOTREACHED();
}
bool GoogleChromeDistribution::ExtractUninstallMetricsFromFile(
- const FilePath& file_path, std::wstring* uninstall_metrics_string) {
+ const FilePath& file_path, string16* uninstall_metrics_string) {
NOTREACHED();
return false;
}
bool GoogleChromeDistribution::ExtractUninstallMetrics(
- const DictionaryValue& root, std::wstring* uninstall_metrics_string) {
+ const DictionaryValue& root, string16* uninstall_metrics_string) {
NOTREACHED();
return false;
}
bool GoogleChromeDistribution::BuildUninstallMetricsString(
- DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) {
+ DictionaryValue* uninstall_metrics_dict, string16* metrics) {
NOTREACHED();
return false;
}
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc
index 195ea69..5e3a8ff 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -25,26 +25,26 @@ GoogleChromeSxSDistribution::GoogleChromeSxSDistribution()
GoogleChromeDistribution::set_product_guid(kChromeSxSGuid);
}
-std::wstring GoogleChromeSxSDistribution::GetApplicationName() {
+string16 GoogleChromeSxSDistribution::GetApplicationName() {
return L"Google Chrome Canary";
}
-std::wstring GoogleChromeSxSDistribution::GetAppShortCutName() {
- const std::wstring& shortcut_name =
+string16 GoogleChromeSxSDistribution::GetAppShortCutName() {
+ const string16& shortcut_name =
installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE);
return shortcut_name;
}
-std::wstring GoogleChromeSxSDistribution::GetBrowserAppId() {
+string16 GoogleChromeSxSDistribution::GetBrowserAppId() {
return kBrowserAppId;
}
-std::wstring GoogleChromeSxSDistribution::GetInstallSubDir() {
+string16 GoogleChromeSxSDistribution::GetInstallSubDir() {
return GoogleChromeDistribution::GetInstallSubDir().append(
installer::kSxSSuffix);
}
-std::wstring GoogleChromeSxSDistribution::GetUninstallRegPath() {
+string16 GoogleChromeSxSDistribution::GetUninstallRegPath() {
return GoogleChromeDistribution::GetUninstallRegPath().append(
installer::kSxSSuffix);
}
@@ -57,7 +57,7 @@ int GoogleChromeSxSDistribution::GetIconIndex() {
return kSxSIconIndex;
}
-bool GoogleChromeSxSDistribution::GetChromeChannel(std::wstring* channel) {
+bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) {
*channel = kChannelName;
return true;
}
@@ -70,6 +70,6 @@ bool GoogleChromeSxSDistribution::GetDelegateExecuteHandlerData(
return false;
}
-std::wstring GoogleChromeSxSDistribution::ChannelName() {
+string16 GoogleChromeSxSDistribution::ChannelName() {
return kChannelName;
}
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h
index 77ff4173..93867ff 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.h
+++ b/chrome/installer/util/google_chrome_sxs_distribution.h
@@ -6,6 +6,7 @@
#define CHROME_INSTALLER_UTIL_GOOGLE_CHROME_SXS_DISTRIBUTION_H_
#pragma once
+#include "base/string16.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_chrome_distribution.h"
#include "chrome/installer/util/l10n_string_util.h"
@@ -19,20 +20,20 @@
// system level install and setting as default browser.
class GoogleChromeSxSDistribution : public GoogleChromeDistribution {
public:
- virtual std::wstring GetApplicationName() OVERRIDE;
- virtual std::wstring GetAppShortCutName() OVERRIDE;
- virtual std::wstring GetBrowserAppId() OVERRIDE;
- virtual std::wstring GetInstallSubDir() OVERRIDE;
- virtual std::wstring GetUninstallRegPath() OVERRIDE;
+ virtual string16 GetApplicationName() OVERRIDE;
+ virtual string16 GetAppShortCutName() OVERRIDE;
+ virtual string16 GetBrowserAppId() OVERRIDE;
+ virtual string16 GetInstallSubDir() OVERRIDE;
+ virtual string16 GetUninstallRegPath() OVERRIDE;
virtual bool CanSetAsDefault() OVERRIDE;
virtual int GetIconIndex() OVERRIDE;
- virtual bool GetChromeChannel(std::wstring* channel) OVERRIDE;
+ virtual bool GetChromeChannel(string16* channel) OVERRIDE;
virtual bool GetDelegateExecuteHandlerData(string16* handler_class_uuid,
string16* type_lib_uuid,
string16* type_lib_version,
string16* interface_uuid) OVERRIDE;
// returns the channel name for GoogleChromeSxSDistribution
- static std::wstring ChannelName();
+ static string16 ChannelName();
private:
friend class BrowserDistribution;