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

Unified Diff: ceee/ie/common/ie_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
Index: ceee/ie/common/ie_util.cc
===================================================================
--- ceee/ie/common/ie_util.cc (revision 71561)
+++ ceee/ie/common/ie_util.cc (working copy)
@@ -43,7 +43,7 @@
return false;
base::win::RegKey key(HKEY_LOCAL_MACHINE, kIeVersionKey, KEY_READ);
DCHECK(key.ValueExists(kIeVersionValue));
- return key.ReadValue(kIeVersionValue, version);
+ return (key.ReadValue(kIeVersionValue, version) == ERROR_SUCCESS);
}
} // namespace
@@ -164,9 +164,12 @@
}
DWORD load_time = 0;
+ LONG result = ERROR_SUCCESS;
if (GetIeVersion() < IEVERSION_IE9) {
- if (!stats_key.ReadValueDW(time_prefix.c_str(), &load_time)) {
- VLOG(1) << "Can't read time: " << time_prefix;
+ result = stats_key.ReadValueDW(time_prefix.c_str(), &load_time);
+ if (result != ERROR_SUCCESS) {
+ VLOG(1) << "Can't read time: " << time_prefix << " error: "
+ << com::LogWe(result);
return kInvalidTime;
}
} else {
@@ -177,9 +180,11 @@
DWORD data_size = sizeof(values);
DWORD data_type = REG_NONE;
- if (!stats_key.ReadValue(value_name.c_str(), &values, &data_size,
- &data_type)) {
- VLOG(1) << "Can't read time: " << value_name;
+ result = stats_key.ReadValue(value_name.c_str(), &values, &data_size,
+ &data_type);
+ if (result != ERROR_SUCCESS) {
+ VLOG(1) << "Can't read time: " << value_name << " error: "
+ << com::LogWe(result);
return kInvalidTime;
}

Powered by Google App Engine
This is Rietveld 408576698