| 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" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool machine_policy_watcher_failed_; | 77 bool machine_policy_watcher_failed_; |
| 78 | 78 |
| 79 // Period to schedule the reload task at. | 79 // Period to schedule the reload task at. |
| 80 int reload_interval_minutes_; | 80 int reload_interval_minutes_; |
| 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 StaticPolicyValueMap& policy_map); | 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(ConfigurationPolicyStore* 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 |
| 107 bool GetRegistryPolicyString(const string16& name, string16* result); | 107 bool GetRegistryPolicyString(const string16& name, string16* result); |
| 108 // Gets a list value contained under |key| one level below the policy root. | 108 // Gets a list value contained under |key| one level below the policy root. |
| 109 bool GetRegistryPolicyStringList(const string16& key, ListValue* result); | 109 bool GetRegistryPolicyStringList(const string16& key, ListValue* result); |
| 110 bool GetRegistryPolicyBoolean(const string16& value_name, bool* result); | 110 bool GetRegistryPolicyBoolean(const string16& value_name, bool* result); |
| 111 bool GetRegistryPolicyInteger(const string16& value_name, uint32* result); | 111 bool GetRegistryPolicyInteger(const string16& value_name, uint32* result); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace policy | 114 } // namespace policy |
| 115 | 115 |
| 116 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ | 116 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_WIN_H_ |
| OLD | NEW |