| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/object_watcher.h" | 9 #include "base/object_watcher.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "base/waitable_event.h" | 12 #include "base/waitable_event.h" |
| 13 #include "base/weak_ptr.h" | 13 #include "base/weak_ptr.h" |
| 14 #include "chrome/browser/policy/configuration_policy_store.h" | 14 #include "chrome/browser/policy/configuration_policy_store_interface.h" |
| 15 #include "chrome/browser/policy/configuration_policy_provider.h" | 15 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 namespace win { | 18 namespace win { |
| 19 class RegKey; | 19 class RegKey; |
| 20 } // namespace win | 20 } // namespace win |
| 21 } // namespace base | 21 } // namespace base |
| 22 | 22 |
| 23 namespace policy { | 23 namespace policy { |
| 24 | 24 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // A reference to a delayed task for timer-based reloading. | 82 // A reference to a delayed task for timer-based reloading. |
| 83 CancelableTask* reload_task_; | 83 CancelableTask* reload_task_; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 explicit ConfigurationPolicyProviderWin( | 86 explicit ConfigurationPolicyProviderWin( |
| 87 const PolicyDefinitionList* policy_list); | 87 const PolicyDefinitionList* policy_list); |
| 88 virtual ~ConfigurationPolicyProviderWin(); | 88 virtual ~ConfigurationPolicyProviderWin(); |
| 89 | 89 |
| 90 // ConfigurationPolicyProvider method overrides: | 90 // ConfigurationPolicyProvider method overrides: |
| 91 virtual bool Provide(ConfigurationPolicyStore* store); | 91 virtual bool Provide(ConfigurationPolicyStoreInterface* store); |
| 92 | 92 |
| 93 protected: | 93 protected: |
| 94 // The sub key path for Chromium's Group Policy information in the | 94 // The sub key path for Chromium's Group Policy information in the |
| 95 // Windows registry. | 95 // Windows registry. |
| 96 static const wchar_t kPolicyRegistrySubKey[]; | 96 static const wchar_t kPolicyRegistrySubKey[]; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 scoped_refptr<GroupPolicyChangeWatcher> watcher_; | 99 scoped_refptr<GroupPolicyChangeWatcher> watcher_; |
| 100 | 100 |
| 101 // Methods to perform type-specific policy lookups in the registry. | 101 // Methods to perform type-specific policy lookups in the registry. |
| 102 // HKLM is checked first, then HKCU. | 102 // HKLM is checked first, then HKCU. |
| 103 | 103 |
| 104 // Reads a string registry value |name| at the specified |key| and puts the | 104 // Reads a string registry value |name| at the specified |key| and puts the |
| 105 // resulting string in |result|. | 105 // resulting string in |result|. |
| 106 | 106 bool GetRegistryPolicyString(const string16& name, string16* result) const; |
| 107 bool GetRegistryPolicyString(const string16& name, string16* result); | |
| 108 // Gets a list value contained under |key| one level below the policy root. | 107 // Gets a list value contained under |key| one level below the policy root. |
| 109 bool GetRegistryPolicyStringList(const string16& key, ListValue* result); | 108 bool GetRegistryPolicyStringList(const string16& key, |
| 110 bool GetRegistryPolicyBoolean(const string16& value_name, bool* result); | 109 ListValue* result) const; |
| 111 bool GetRegistryPolicyInteger(const string16& value_name, uint32* result); | 110 bool GetRegistryPolicyBoolean(const string16& value_name, |
| 111 bool* result) const; |
| 112 bool GetRegistryPolicyInteger(const string16& value_name, |
| 113 uint32* result) const; |
| 112 }; | 114 }; |
| 113 | 115 |
| 114 } // namespace policy | 116 } // namespace policy |
| 115 | 117 |
| 116 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ | 118 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ |
| OLD | NEW |