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

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 70414)
+++ 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
@@ -165,7 +165,8 @@
DWORD load_time = 0;
if (GetIeVersion() < IEVERSION_IE9) {
- if (!stats_key.ReadValueDW(time_prefix.c_str(), &load_time)) {
+ LONG result = stats_key.ReadValueDW(time_prefix.c_str(), &load_time);
Sigurður Ásgeirsson 2011/01/10 21:02:43 ugh, I guess we rely on this everywhere. Can I sti
+ if (result != ERROR_SUCCESS) {
VLOG(1) << "Can't read time: " << time_prefix;
return kInvalidTime;
}
@@ -177,8 +178,9 @@
DWORD data_size = sizeof(values);
DWORD data_type = REG_NONE;
- if (!stats_key.ReadValue(value_name.c_str(), &values, &data_size,
- &data_type)) {
+ LONG 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;
Sigurður Ásgeirsson 2011/01/10 21:02:43 com::LogWe(result) now that we have the error in q
amit 2011/01/12 04:11:23 Done.
return kInvalidTime;
}

Powered by Google App Engine
This is Rietveld 408576698