summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/client_util.cc9
-rw-r--r--chrome/browser/first_run_win.cc4
-rw-r--r--chrome/installer/util/browser_distribution.cc4
-rw-r--r--chrome/installer/util/browser_distribution.h2
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.cc4
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.h1
-rw-r--r--chrome/installer/util/google_update_constants.cc1
-rw-r--r--chrome/installer/util/google_update_constants.h2
8 files changed, 20 insertions, 7 deletions
diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc
index c822ec8..e4b2b78 100644
--- a/chrome/app/client_util.cc
+++ b/chrome/app/client_util.cc
@@ -160,7 +160,9 @@ HMODULE MainDllLoader::Load(std::wstring* version, std::wstring* file) {
if (dll)
return dll;
- if (!EnvQueryStr(google_update::kEnvProductVersionKey, version)) {
+ if (!EnvQueryStr(
+ BrowserDistribution::GetDistribution()->GetEnvVersionKey().c_str(),
+ version)) {
std::wstring reg_path(GetRegistryPath());
// Look into the registry to find the latest version.
if (!GetVersion(dir.c_str(), reg_path.c_str(), version))
@@ -183,8 +185,9 @@ int MainDllLoader::Launch(HINSTANCE instance,
if (!dll_)
return ResultCodes::MISSING_DATA;
- ::SetEnvironmentVariableW(google_update::kEnvProductVersionKey,
- version.c_str());
+ ::SetEnvironmentVariableW(
+ BrowserDistribution::GetDistribution()->GetEnvVersionKey().c_str(),
+ version.c_str());
InitCrashReporterWithDllPath(file);
OnBeforeLaunch(version);
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc
index 4797a73..f12a75b 100644
--- a/chrome/browser/first_run_win.cc
+++ b/chrome/browser/first_run_win.cc
@@ -407,7 +407,9 @@ bool Upgrade::IsBrowserAlreadyRunning() {
}
bool Upgrade::RelaunchChromeBrowser(const CommandLine& command_line) {
- ::SetEnvironmentVariable(google_update::kEnvProductVersionKey, NULL);
+ ::SetEnvironmentVariable(
+ BrowserDistribution::GetDistribution()->GetEnvVersionKey().c_str(),
+ NULL);
return base::LaunchApp(command_line.command_line_string(),
false, false, NULL);
}
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index c038281..21cdac5 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -134,6 +134,10 @@ std::wstring BrowserDistribution::GetVersionKey() {
return L"Software\\Chromium";
}
+std::wstring BrowserDistribution::GetEnvVersionKey() {
+ return L"CHROME_VERSION";
+}
+
bool BrowserDistribution::CanSetAsDefault() {
return true;
}
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index 544168b..dd271d8 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -58,6 +58,8 @@ class BrowserDistribution {
virtual std::wstring GetVersionKey();
+ virtual std::wstring GetEnvVersionKey();
+
virtual bool CanSetAsDefault();
virtual bool ShouldUseAlternateIcon();
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc
index bb37b46..19dad79 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -34,6 +34,10 @@ std::wstring GoogleChromeSxSDistribution::GetUninstallRegPath() {
installer_util::kSxSSuffix);
}
+std::wstring GoogleChromeSxSDistribution::GetEnvVersionKey() {
+ return L"CHROME_SXS_VERSION";
+}
+
bool GoogleChromeSxSDistribution::CanSetAsDefault() {
return false;
}
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h
index 6042e9e..6503e0a 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.h
+++ b/chrome/installer/util/google_chrome_sxs_distribution.h
@@ -22,6 +22,7 @@ class GoogleChromeSxSDistribution : public GoogleChromeDistribution {
virtual std::wstring GetAppShortCutName();
virtual std::wstring GetInstallSubDir();
virtual std::wstring GetUninstallRegPath();
+ virtual std::wstring GetEnvVersionKey();
virtual bool CanSetAsDefault();
virtual bool ShouldUseAlternateIcon();
virtual bool GetChromeChannel(std::wstring* channel);
diff --git a/chrome/installer/util/google_update_constants.cc b/chrome/installer/util/google_update_constants.cc
index 2c77a0e..8c1a2a4 100644
--- a/chrome/installer/util/google_update_constants.cc
+++ b/chrome/installer/util/google_update_constants.cc
@@ -30,7 +30,6 @@ const wchar_t kRegUsageStatsField[] = L"usagestats";
const wchar_t kRegVersionField[] = L"pv";
const wchar_t kRegReferralField[] = L"referral";
const wchar_t kRegEULAAceptedField[] = L"eulaaccepted";
-const wchar_t kEnvProductVersionKey[] = L"CHROME_VERSION";
const wchar_t kRegLastRunTimeField[] = L"lastrun";
} // namespace google_update
diff --git a/chrome/installer/util/google_update_constants.h b/chrome/installer/util/google_update_constants.h
index e21a198..90e8e3d 100644
--- a/chrome/installer/util/google_update_constants.h
+++ b/chrome/installer/util/google_update_constants.h
@@ -41,8 +41,6 @@ extern const wchar_t kRegVersionField[];
extern const wchar_t kRegReferralField[];
extern const wchar_t kRegEULAAceptedField[];
-extern const wchar_t kEnvProductVersionKey[];
-
// last time that chrome ran in the Time internal format.
extern const wchar_t kRegLastRunTimeField[];