diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 18:24:31 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 18:24:31 +0000 |
commit | 2e0c7ca3f0276039e5d132b6aa1502fffa9babd6 (patch) | |
tree | bdfa043d92d891ba72475a6ced9874424c11f9e8 /chrome/installer/util/channel_info.cc | |
parent | 221a5d9580d012745509baa02d0e77c9d9f5782e (diff) | |
download | chromium_src-2e0c7ca3f0276039e5d132b6aa1502fffa9babd6.zip chromium_src-2e0c7ca3f0276039e5d132b6aa1502fffa9babd6.tar.gz chromium_src-2e0c7ca3f0276039e5d132b6aa1502fffa9babd6.tar.bz2 |
Correct erroneous display of the channel name "unknown" when the "ap" value is absent (an absent "ap" means the same thing as an empty "ap" value, namely Stable). Do this by causing ChannelInfo::Initialize to not return false when the "ap" value is missing.
Update unit tests that were checking for the old behaviour of ChannelInfo.
BUG=80683
TEST=Install Stable channel Chrome on Windows. Go to the about box. Observe that the string "unknown" does not show up in the version number.
Review URL: http://codereview.chromium.org/6901070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/channel_info.cc')
-rw-r--r-- | chrome/installer/util/channel_info.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/installer/util/channel_info.cc b/chrome/installer/util/channel_info.cc index f2bb28d..8e6665e 100644 --- a/chrome/installer/util/channel_info.cc +++ b/chrome/installer/util/channel_info.cc @@ -134,7 +134,9 @@ bool SetModifier(ModifierIndex index, bool set, std::wstring* ap_value) { namespace installer { bool ChannelInfo::Initialize(const RegKey& key) { - return (key.ReadValue(google_update::kRegApField, &value_) == ERROR_SUCCESS); + LONG result = key.ReadValue(google_update::kRegApField, &value_); + return result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND || + result == ERROR_INVALID_HANDLE; } bool ChannelInfo::Write(RegKey* key) const { |