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

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
« no previous file with comments | « net/base/platform_mime_util_win.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_config_service_win.cc
===================================================================
--- net/base/ssl_config_service_win.cc (revision 71761)
+++ net/base/ssl_config_service_win.cc (working copy)
@@ -63,17 +63,15 @@
// http://crbug.com/61455
base::ThreadRestrictions::ScopedAllowIO allow_io;
RegKey internet_settings;
- if (!internet_settings.Open(HKEY_CURRENT_USER, kInternetSettingsSubKeyName,
- KEY_READ))
+ if (internet_settings.Open(HKEY_CURRENT_USER, kInternetSettingsSubKeyName,
+ KEY_READ) != 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 +118,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
« no previous file with comments | « net/base/platform_mime_util_win.cc ('k') | net/proxy/proxy_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698