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

Side by Side Diff: chrome/browser/policy/configuration_policy_provider_delegate_win.h

Issue 8258018: Generate Chrome policy definition list from policy_templates.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the unittest fix Created 9 years, 2 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
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698