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

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

Issue 4062002: Dynamic policy refresh support for the Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/map/list/, nits. Created 10 years, 1 month 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) 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_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 <string> 9 #include <string>
10 #include <set> 10 #include <set>
(...skipping 23 matching lines...) Expand all
34 34
35 // ConfigurationPolicyStore methods: 35 // ConfigurationPolicyStore methods:
36 virtual void Apply(PolicyType setting, Value* value); 36 virtual void Apply(PolicyType setting, Value* value);
37 37
38 // Creates a ConfigurationPolicyPrefStore that reads managed policy. 38 // Creates a ConfigurationPolicyPrefStore that reads managed policy.
39 static ConfigurationPolicyPrefStore* CreateManagedPolicyPrefStore(); 39 static ConfigurationPolicyPrefStore* CreateManagedPolicyPrefStore();
40 40
41 // Creates a ConfigurationPolicyPrefStore that reads recommended policy. 41 // Creates a ConfigurationPolicyPrefStore that reads recommended policy.
42 static ConfigurationPolicyPrefStore* CreateRecommendedPolicyPrefStore(); 42 static ConfigurationPolicyPrefStore* CreateRecommendedPolicyPrefStore();
43 43
44 // Returns the default policy value map for Chrome. 44 // Returns the default policy definition list for Chrome.
45 static ConfigurationPolicyProvider::StaticPolicyValueMap 45 static ConfigurationPolicyProvider::PolicyDefinitionList*
46 GetChromePolicyValueMap(); 46 GetChromePolicyDefinitionList();
47 47
48 typedef std::set<const char*> ProxyPreferenceSet; 48 typedef std::set<const char*> ProxyPreferenceSet;
49 49
50 // Returns the set of preference paths that can be affected by a proxy 50 // Returns the set of preference paths that can be affected by a proxy
51 // policy. 51 // policy.
52 static void GetProxyPreferenceSet(ProxyPreferenceSet* proxy_pref_set); 52 static void GetProxyPreferenceSet(ProxyPreferenceSet* proxy_pref_set);
53 53
54 private: 54 private:
55 // Policies that map to a single preference are handled 55 // Policies that map to a single preference are handled
56 // by an automated converter. Each one of these policies 56 // by an automated converter. Each one of these policies
57 // has an entry in |simple_policy_map_| with the following type. 57 // has an entry in |simple_policy_map_| with the following type.
58 struct PolicyToPreferenceMapEntry { 58 struct PolicyToPreferenceMapEntry {
59 Value::ValueType value_type; 59 Value::ValueType value_type;
60 PolicyType policy_type; 60 PolicyType policy_type;
61 const char* preference_path; // A DictionaryValue path, not a file path. 61 const char* preference_path; // A DictionaryValue path, not a file path.
62 }; 62 };
63 63
64 static const PolicyToPreferenceMapEntry simple_policy_map_[]; 64 static const PolicyToPreferenceMapEntry simple_policy_map_[];
65 static const PolicyToPreferenceMapEntry proxy_policy_map_[]; 65 static const PolicyToPreferenceMapEntry proxy_policy_map_[];
66 static const PolicyToPreferenceMapEntry default_search_policy_map_[]; 66 static const PolicyToPreferenceMapEntry default_search_policy_map_[];
67 static const ConfigurationPolicyProvider::StaticPolicyValueMap 67 static const ConfigurationPolicyProvider::PolicyDefinitionList
68 policy_value_map_; 68 policy_definition_list_;
69 69
70 ConfigurationPolicyProvider* provider_; 70 ConfigurationPolicyProvider* provider_;
71 scoped_ptr<DictionaryValue> prefs_; 71 scoped_ptr<DictionaryValue> prefs_;
72 72
73 // Set to false until the first proxy-relevant policy is applied. At that 73 // Set to false until the first proxy-relevant policy is applied. At that
74 // time, default values are provided for all proxy-relevant prefs 74 // time, default values are provided for all proxy-relevant prefs
75 // to override any values set from stores with a lower priority. 75 // to override any values set from stores with a lower priority.
76 bool lower_priority_proxy_settings_overridden_; 76 bool lower_priority_proxy_settings_overridden_;
77 77
78 // The following are used to track what proxy-relevant policy has been applied 78 // The following are used to track what proxy-relevant policy has been applied
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // unspecified map entries. Otherwise wipes all default search related 122 // unspecified map entries. Otherwise wipes all default search related
123 // map entries from |prefs_|. 123 // map entries from |prefs_|.
124 void FinalizeDefaultSearchPolicySettings(); 124 void FinalizeDefaultSearchPolicySettings();
125 125
126 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); 126 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore);
127 }; 127 };
128 128
129 } // namespace policy 129 } // namespace policy
130 130
131 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ 131 #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