diff options
author | siggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 17:04:09 +0000 |
---|---|---|
committer | siggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 17:04:09 +0000 |
commit | dd224e13b5371d1d313424247eea37f5b0d20acb (patch) | |
tree | 5570af9c7b0517accd94caee4c44de1363affc4d /chrome/common | |
parent | 402cfefb2da2e34d41f6ec5b84cf3b4dbfbfc9c7 (diff) | |
download | chromium_src-dd224e13b5371d1d313424247eea37f5b0d20acb.zip chromium_src-dd224e13b5371d1d313424247eea37f5b0d20acb.tar.gz chromium_src-dd224e13b5371d1d313424247eea37f5b0d20acb.tar.bz2 |
Make sure GoogleUpdateSettings::GetChromeChannel does not read
from the wrong section of registry when a per-user install has left
some registrations behind.
Fix the odd race and other bugs I encountered along the way.
BUG=40994
TEST=Unittests in this change. Open about box and look at the channel string.
Review URL: http://codereview.chromium.org/1582035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/platform_util_win.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc index 73311f8..79d1034 100644 --- a/chrome/common/platform_util_win.cc +++ b/chrome/common/platform_util_win.cc @@ -12,12 +12,14 @@ #include "app/win_util.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/path_service.h" #include "base/logging.h" #include "base/registry.h" #include "base/scoped_comptr_win.h" #include "base/string_util.h" #include "chrome/installer/util/google_update_settings.h" #include "chrome/installer/util/google_update_constants.h" +#include "chrome/installer/util/install_util.h" #include "gfx/native_widget_types.h" #include "googleurl/src/gurl.h" @@ -154,8 +156,14 @@ void SimpleErrorBox(gfx::NativeWindow parent, string16 GetVersionStringModifier() { #if defined(GOOGLE_CHROME_BUILD) + FilePath module; string16 channel; - GoogleUpdateSettings::GetChromeChannel(&channel); + if (PathService::Get(base::FILE_MODULE, &module)) { + bool is_system_install = + !InstallUtil::IsPerUserInstall(module.value().c_str()); + + GoogleUpdateSettings::GetChromeChannel(is_system_install, &channel); + } return channel; #else return string16(); |