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

Unified Diff: chrome/browser/policy/configuration_policy_provider_win.cc

Issue 3185032: Reland r57575 - Remove the default argument from RegKey::Open. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: policy fixes Created 10 years, 4 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 | « chrome/browser/platform_util_win.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/configuration_policy_provider_win.cc
diff --git a/chrome/browser/policy/configuration_policy_provider_win.cc b/chrome/browser/policy/configuration_policy_provider_win.cc
index 5d79da696fd9ba9e8e4c152238e714d1ac8ba978..0ccb559ee3e292aa5e48b6ae318eb0ba3eceed8f 100644
--- a/chrome/browser/policy/configuration_policy_provider_win.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win.cc
@@ -62,13 +62,13 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyString(
string16 path = string16(policy::kRegistrySubKey);
RegKey policy_key;
// First try the global policy.
- if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str())) {
+ if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ)) {
if (ReadRegistryStringValue(&policy_key, name, result))
return true;
policy_key.Close();
}
// Fall back on user-specific policy.
- if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str()))
+ if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str(), KEY_READ))
return false;
return ReadRegistryStringValue(&policy_key, name, result);
}
@@ -100,10 +100,10 @@ bool ConfigurationPolicyProviderWin::GetRegistryPolicyStringList(
string16 path = string16(policy::kRegistrySubKey);
path += ASCIIToUTF16("\\") + key;
RegKey policy_key;
- if (!policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str())) {
+ if (!policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ)) {
policy_key.Close();
// Fall back on user-specific policy.
- if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str()))
+ if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str(), KEY_READ))
return false;
}
string16 policy_string;
« no previous file with comments | « chrome/browser/platform_util_win.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698