From 8eeef8a32b1dec889ec39282f299079c82c409d9 Mon Sep 17 00:00:00 2001 From: "mattm@chromium.org" Date: Fri, 23 Apr 2010 22:06:07 +0000 Subject: Win SxS: Show SxS in about box version instead of unknown. BUG=37129,38334 TEST=install sxs, check about box and about:version Review URL: http://codereview.chromium.org/1771003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45496 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/util/browser_distribution.cc | 4 ++++ chrome/installer/util/browser_distribution.h | 2 ++ chrome/installer/util/google_chrome_sxs_distribution.cc | 5 +++++ chrome/installer/util/google_chrome_sxs_distribution.h | 1 + chrome/installer/util/google_update_settings.cc | 8 +++++--- 5 files changed, 17 insertions(+), 3 deletions(-) (limited to 'chrome/installer') diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc index 210e8e1..c038281 100644 --- a/chrome/installer/util/browser_distribution.cc +++ b/chrome/installer/util/browser_distribution.cc @@ -142,6 +142,10 @@ bool BrowserDistribution::ShouldUseAlternateIcon() { return false; } +bool BrowserDistribution::GetChromeChannel(std::wstring* channel) { + return false; +} + void BrowserDistribution::UpdateDiffInstallStatus(bool system_install, bool incremental_install, installer_util::InstallStatus install_status) { } diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h index 66ba1e2..544168b 100644 --- a/chrome/installer/util/browser_distribution.h +++ b/chrome/installer/util/browser_distribution.h @@ -62,6 +62,8 @@ class BrowserDistribution { virtual bool ShouldUseAlternateIcon(); + virtual bool GetChromeChannel(std::wstring* channel); + virtual void UpdateDiffInstallStatus(bool system_install, bool incremental_install, installer_util::InstallStatus install_status); diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc index 858e35f..bb37b46 100644 --- a/chrome/installer/util/google_chrome_sxs_distribution.cc +++ b/chrome/installer/util/google_chrome_sxs_distribution.cc @@ -41,3 +41,8 @@ bool GoogleChromeSxSDistribution::CanSetAsDefault() { bool GoogleChromeSxSDistribution::ShouldUseAlternateIcon() { return true; } + +bool GoogleChromeSxSDistribution::GetChromeChannel(std::wstring* channel) { + *channel = L"SxS"; + return true; +} diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h index 9fc540d..6042e9e 100644 --- a/chrome/installer/util/google_chrome_sxs_distribution.h +++ b/chrome/installer/util/google_chrome_sxs_distribution.h @@ -24,6 +24,7 @@ class GoogleChromeSxSDistribution : public GoogleChromeDistribution { virtual std::wstring GetUninstallRegPath(); virtual bool CanSetAsDefault(); virtual bool ShouldUseAlternateIcon(); + virtual bool GetChromeChannel(std::wstring* channel); private: friend class BrowserDistribution; diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc index dd8851c..6765ae1 100644 --- a/chrome/installer/util/google_update_settings.cc +++ b/chrome/installer/util/google_update_settings.cc @@ -9,6 +9,7 @@ #include "base/time.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_update_constants.h" +#include "chrome/installer/util/install_util.h" namespace { @@ -145,8 +146,11 @@ bool GoogleUpdateSettings::ClearReferral() { bool GoogleUpdateSettings::GetChromeChannel(bool system_install, std::wstring* channel) { - HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + if (dist->GetChromeChannel(channel)) + return true; + + HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; std::wstring reg_path = dist->GetStateKey(); RegKey key(root_key, reg_path.c_str(), KEY_READ); std::wstring update_branch; @@ -171,5 +175,3 @@ bool GoogleUpdateSettings::GetChromeChannel(bool system_install, return true; } - - -- cgit v1.1