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

Unified Diff: net/base/ssl_config_service_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
Index: net/base/ssl_config_service_win.cc
===================================================================
--- net/base/ssl_config_service_win.cc (revision 70917)
+++ net/base/ssl_config_service_win.cc (working copy)
@@ -63,17 +63,16 @@
// http://crbug.com/61455
base::ThreadRestrictions::ScopedAllowIO allow_io;
RegKey internet_settings;
- if (!internet_settings.Open(HKEY_CURRENT_USER, kInternetSettingsSubKeyName,
- KEY_READ))
+ LONG result = internet_settings.Open(HKEY_CURRENT_USER,
+ kInternetSettingsSubKeyName, KEY_READ);
+ if (result != ERROR_SUCCESS)
return false;
- DWORD revocation;
- if (!internet_settings.ReadValueDW(kRevocationValueName, &revocation))
- revocation = REVOCATION_DEFAULT;
+ DWORD revocation = REVOCATION_DEFAULT;
+ internet_settings.ReadValueDW(kRevocationValueName, &revocation);
- DWORD protocols;
- if (!internet_settings.ReadValueDW(kProtocolsValueName, &protocols))
- protocols = PROTOCOLS_DEFAULT;
+ DWORD protocols = PROTOCOLS_DEFAULT;
+ internet_settings.ReadValueDW(kProtocolsValueName, &protocols);
config->rev_checking_enabled = (revocation != 0);
config->ssl3_enabled = ((protocols & SSL3) != 0);
@@ -120,9 +119,9 @@
base::ThreadRestrictions::ScopedAllowIO allow_io;
RegKey internet_settings(HKEY_CURRENT_USER, kInternetSettingsSubKeyName,
KEY_READ | KEY_WRITE);
- DWORD value;
- if (!internet_settings.ReadValueDW(kProtocolsValueName, &value))
- value = PROTOCOLS_DEFAULT;
+ DWORD value = PROTOCOLS_DEFAULT;
+ internet_settings.ReadValueDW(kProtocolsValueName, &value);
+
if (enabled)
value |= version;
else

Powered by Google App Engine
This is Rietveld 408576698