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

Side by Side Diff: chrome/browser/policy/configuration_policy_provider_win.cc

Issue 3211004: Revert 57572 - Remove the default argument from RegKey::Open.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/configuration_policy_provider_win.h" 5 #include "chrome/browser/policy/configuration_policy_provider_win.h"
6 6
7 #include <userenv.h> 7 #include <userenv.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 ConfigurationPolicyProviderWin::ConfigurationPolicyProviderWin() { 56 ConfigurationPolicyProviderWin::ConfigurationPolicyProviderWin() {
57 watcher_.reset(new GroupPolicyChangeWatcher(this)); 57 watcher_.reset(new GroupPolicyChangeWatcher(this));
58 } 58 }
59 59
60 bool ConfigurationPolicyProviderWin::GetRegistryPolicyString( 60 bool ConfigurationPolicyProviderWin::GetRegistryPolicyString(
61 const string16& name, string16* result) { 61 const string16& name, string16* result) {
62 string16 path = string16(policy::kRegistrySubKey); 62 string16 path = string16(policy::kRegistrySubKey);
63 RegKey policy_key; 63 RegKey policy_key;
64 // First try the global policy. 64 // First try the global policy.
65 if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ)) { 65 if (policy_key.Open(HKEY_LOCAL_MACHINE, path.c_str())) {
66 if (ReadRegistryStringValue(&policy_key, name, result)) 66 if (ReadRegistryStringValue(&policy_key, name, result))
67 return true; 67 return true;
68 policy_key.Close(); 68 policy_key.Close();
69 } 69 }
70 // Fall back on user-specific policy. 70 // Fall back on user-specific policy.
71 if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str())) 71 if (!policy_key.Open(HKEY_CURRENT_USER, path.c_str()))
72 return false; 72 return false;
73 return ReadRegistryStringValue(&policy_key, name, result); 73 return ReadRegistryStringValue(&policy_key, name, result);
74 } 74 }
75 75
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 break; 188 break;
189 } 189 }
190 default: 190 default:
191 NOTREACHED(); 191 NOTREACHED();
192 return false; 192 return false;
193 } 193 }
194 } 194 }
195 195
196 return true; 196 return true;
197 } 197 }
OLDNEW
« 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