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

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store.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_PREF_STORE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 static ConfigurationPolicyPrefStore* CreateManagedCloudPolicyPrefStore(); 64 static ConfigurationPolicyPrefStore* CreateManagedCloudPolicyPrefStore();
65 65
66 // Creates a ConfigurationPolicyPrefStore that reads recommended platform 66 // Creates a ConfigurationPolicyPrefStore that reads recommended platform
67 // policy. 67 // policy.
68 static ConfigurationPolicyPrefStore* 68 static ConfigurationPolicyPrefStore*
69 CreateRecommendedPlatformPolicyPrefStore(); 69 CreateRecommendedPlatformPolicyPrefStore();
70 70
71 // Creates a ConfigurationPolicyPrefStore that reads recommended cloud policy. 71 // Creates a ConfigurationPolicyPrefStore that reads recommended cloud policy.
72 static ConfigurationPolicyPrefStore* CreateRecommendedCloudPolicyPrefStore(); 72 static ConfigurationPolicyPrefStore* CreateRecommendedCloudPolicyPrefStore();
73 73
74 // Returns the default policy definition list for Chrome.
75 static const ConfigurationPolicyProvider::PolicyDefinitionList*
76 GetChromePolicyDefinitionList();
77
78 // Returns true if the given policy is a proxy policy. 74 // Returns true if the given policy is a proxy policy.
79 static bool IsProxyPolicy(ConfigurationPolicyType policy); 75 static bool IsProxyPolicy(ConfigurationPolicyType policy);
80 76
81 private: 77 private:
82 // Refreshes policy information, rereading policy from the provider and 78 // Refreshes policy information, rereading policy from the provider and
83 // sending out change notifications as appropriate. 79 // sending out change notifications as appropriate.
84 void Refresh(); 80 void Refresh();
85 81
86 static const ConfigurationPolicyProvider::PolicyDefinitionList
87 kPolicyDefinitionList;
88
89 // The policy provider from which policy settings are read. 82 // The policy provider from which policy settings are read.
90 ConfigurationPolicyProvider* provider_; 83 ConfigurationPolicyProvider* provider_;
91 84
92 // Initialization status as reported by the policy provider the last time we 85 // Initialization status as reported by the policy provider the last time we
93 // queried it. 86 // queried it.
94 bool initialization_complete_; 87 bool initialization_complete_;
95 88
96 // Current policy preferences. 89 // Current policy preferences.
97 scoped_ptr<ConfigurationPolicyPrefKeeper> policy_keeper_; 90 scoped_ptr<ConfigurationPolicyPrefKeeper> policy_keeper_;
98 91
99 ObserverList<PrefStore::Observer, true> observers_; 92 ObserverList<PrefStore::Observer, true> observers_;
100 93
101 ConfigurationPolicyObserverRegistrar registrar_; 94 ConfigurationPolicyObserverRegistrar registrar_;
102 95
103 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); 96 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore);
104 }; 97 };
105 98
106 } // namespace policy 99 } // namespace policy
107 100
108 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ 101 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_provider_unittest.cc ('k') | chrome/browser/policy/configuration_policy_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698