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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/browser/rlz/rlz_unittest.cc ('k') | chrome/browser/ui/views/external_protocol_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_win.cc
===================================================================
--- chrome/browser/shell_integration_win.cc (revision 71761)
+++ chrome/browser/shell_integration_win.cc (working copy)
@@ -346,7 +346,7 @@
std::wstring key_path(kChromeProtocols[i] + ShellUtil::kRegShellOpen);
base::win::RegKey key(root_key, key_path.c_str(), KEY_READ);
std::wstring value;
- if (!key.Valid() || !key.ReadValue(L"", &value))
+ if (!key.Valid() || (key.ReadValue(L"", &value) != ERROR_SUCCESS))
return NOT_DEFAULT_BROWSER;
// Need to normalize path in case it's been munged.
CommandLine command_line = CommandLine::FromString(value);
@@ -377,7 +377,7 @@
std::wstring app_cmd;
base::win::RegKey key(HKEY_CURRENT_USER,
ShellUtil::kRegVistaUrlPrefs, KEY_READ);
- if (key.Valid() && key.ReadValue(L"Progid", &app_cmd) &&
+ if (key.Valid() && (key.ReadValue(L"Progid", &app_cmd) == ERROR_SUCCESS) &&
app_cmd == L"FirefoxURL")
ff_default = true;
} else {
@@ -385,7 +385,7 @@
key_path.append(ShellUtil::kRegShellOpen);
base::win::RegKey key(HKEY_CLASSES_ROOT, key_path.c_str(), KEY_READ);
std::wstring app_cmd;
- if (key.Valid() && key.ReadValue(L"", &app_cmd) &&
+ if (key.Valid() && (key.ReadValue(L"", &app_cmd) == ERROR_SUCCESS) &&
std::wstring::npos != StringToLowerASCII(app_cmd).find(L"firefox"))
ff_default = true;
}
« no previous file with comments | « chrome/browser/rlz/rlz_unittest.cc ('k') | chrome/browser/ui/views/external_protocol_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698