summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:06:07 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:06:07 +0000
commit8eeef8a32b1dec889ec39282f299079c82c409d9 (patch)
treead059eba75fed69b2d12315e8669c8cc6b87f19c /chrome/installer/util
parent1e08646c43e6a02f6dfb69de395f5394097a7fb8 (diff)
downloadchromium_src-8eeef8a32b1dec889ec39282f299079c82c409d9.zip
chromium_src-8eeef8a32b1dec889ec39282f299079c82c409d9.tar.gz
chromium_src-8eeef8a32b1dec889ec39282f299079c82c409d9.tar.bz2
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
Diffstat (limited to 'chrome/installer/util')
-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.cc5
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.h1
-rw-r--r--chrome/installer/util/google_update_settings.cc8
5 files changed, 17 insertions, 3 deletions
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;
}
-
-