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

Unified Diff: base/win/win_util.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 | « base/win/registry_unittest.cc ('k') | ceee/ie/common/ceee_module_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util.cc
===================================================================
--- base/win/win_util.cc (revision 71761)
+++ base/win/win_util.cc (working copy)
@@ -93,7 +93,7 @@
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
KEY_READ);
DWORD uac_enabled;
- if (!key.ReadValueDW(L"EnableLUA", &uac_enabled))
+ if (key.ReadValueDW(L"EnableLUA", &uac_enabled) != ERROR_SUCCESS)
return true;
// Users can set the EnableLUA value to something arbitrary, like 2, which
// Vista will treat as UAC enabled, so we make sure it is not set to 0.
@@ -128,12 +128,13 @@
bool AddCommandToAutoRun(HKEY root_key, const string16& name,
const string16& command) {
base::win::RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
- return autorun_key.WriteValue(name.c_str(), command.c_str());
+ return (autorun_key.WriteValue(name.c_str(), command.c_str()) ==
+ ERROR_SUCCESS);
}
bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name) {
base::win::RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
- return autorun_key.DeleteValue(name.c_str());
+ return (autorun_key.DeleteValue(name.c_str()) == ERROR_SUCCESS);
}
} // namespace win
« no previous file with comments | « base/win/registry_unittest.cc ('k') | ceee/ie/common/ceee_module_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698