| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/policy/asynchronous_policy_provider.h" | 9 #include "chrome/browser/policy/asynchronous_policy_provider.h" |
| 10 | 10 |
| 11 namespace policy { | 11 namespace policy { |
| 12 | 12 |
| 13 class ConfigurationPolicyProviderDelegateWin | 13 class ConfigurationPolicyProviderDelegateWin |
| 14 : public AsynchronousPolicyProvider::Delegate { | 14 : public AsynchronousPolicyProvider::Delegate { |
| 15 public: | 15 public: |
| 16 explicit ConfigurationPolicyProviderDelegateWin( | 16 explicit ConfigurationPolicyProviderDelegateWin( |
| 17 const ConfigurationPolicyProvider::PolicyDefinitionList* | 17 const PolicyDefinitionList* policy_definition_list); |
| 18 policy_definition_list); | |
| 19 virtual ~ConfigurationPolicyProviderDelegateWin() {} | 18 virtual ~ConfigurationPolicyProviderDelegateWin() {} |
| 20 | 19 |
| 21 // AsynchronousPolicyProvider::Delegate overrides: | 20 // AsynchronousPolicyProvider::Delegate overrides: |
| 22 virtual DictionaryValue* Load() OVERRIDE; | 21 virtual DictionaryValue* Load() OVERRIDE; |
| 23 | 22 |
| 24 private: | 23 private: |
| 25 // Methods to perform type-specific policy lookups in the registry. | 24 // Methods to perform type-specific policy lookups in the registry. |
| 26 // HKLM is checked first, then HKCU. | 25 // HKLM is checked first, then HKCU. |
| 27 | 26 |
| 28 // Reads a string registry value |name| at the specified |key| and puts the | 27 // Reads a string registry value |name| at the specified |key| and puts the |
| 29 // resulting string in |result|. | 28 // resulting string in |result|. |
| 30 bool GetRegistryPolicyString(const string16& name, string16* result) const; | 29 bool GetRegistryPolicyString(const string16& name, string16* result) const; |
| 31 // Gets a list value contained under |key| one level below the policy root. | 30 // Gets a list value contained under |key| one level below the policy root. |
| 32 bool GetRegistryPolicyStringList(const string16& key, | 31 bool GetRegistryPolicyStringList(const string16& key, |
| 33 ListValue* result) const; | 32 ListValue* result) const; |
| 34 bool GetRegistryPolicyBoolean(const string16& value_name, | 33 bool GetRegistryPolicyBoolean(const string16& value_name, |
| 35 bool* result) const; | 34 bool* result) const; |
| 36 bool GetRegistryPolicyInteger(const string16& value_name, | 35 bool GetRegistryPolicyInteger(const string16& value_name, |
| 37 uint32* result) const; | 36 uint32* result) const; |
| 38 | 37 |
| 39 const ConfigurationPolicyProvider::PolicyDefinitionList* | 38 const PolicyDefinitionList* policy_definition_list_; |
| 40 policy_definition_list_; | |
| 41 | 39 |
| 42 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderDelegateWin); | 40 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderDelegateWin); |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 } // namespace policy | 43 } // namespace policy |
| 46 | 44 |
| 47 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ | 45 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_DELEGATE_WIN_H_ |
| OLD | NEW |