Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3855)

Unified Diff: chrome/common/platform_util_win.cc

Issue 534005: Per discussion with mal, recognize the stable branch (parent regkey... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/platform_util_win.cc
===================================================================
--- chrome/common/platform_util_win.cc (revision 35825)
+++ chrome/common/platform_util_win.cc (working copy)
@@ -184,17 +184,23 @@
std::wstring(L"\\") + google_update::kChromeUpgradeCode;
RegKey client_state(registry_hive, key.c_str(), KEY_READ);
client_state.ReadValue(google_update::kRegApField, &update_branch);
+ // If the parent folder exists (we have a valid install) but the
+ // 'ap' key is empty, we necessarily are the stable channel.
+ if (update_branch.empty() && client_state.Valid()) {
+ update_branch = L"stable";
+ }
}
// Map to something pithy for human consumption. There are no rules as to
// what the ap string can contain, but generally it will contain a number
// followed by a dash followed by the branch name (and then some random
- // suffix). We fall back on empty string, in case we fail to parse (or the
- // branch is stable).
+ // suffix). We fall back on empty string in case we fail to parse.
if (update_branch.find(L"-beta") != std::wstring::npos)
update_branch = L"beta";
else if (update_branch.find(L"-dev") != std::wstring::npos)
update_branch = L"dev";
+ else if (update_branch.find(L"stable") != std::wstring::npos)
+ update_branch = L"stable";
else
update_branch = L"";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698