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

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

Issue 10316022: Wire up the policy for controlling pinned apps in the ash launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_HANDLER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual void ApplyPolicySettings(const PolicyMap& policies, 92 virtual void ApplyPolicySettings(const PolicyMap& policies,
93 PrefValueMap* prefs) OVERRIDE; 93 PrefValueMap* prefs) OVERRIDE;
94 94
95 private: 95 private:
96 // The DictionaryValue path of the preference the policy maps to. 96 // The DictionaryValue path of the preference the policy maps to.
97 const char* pref_path_; 97 const char* pref_path_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(SimplePolicyHandler); 99 DISALLOW_COPY_AND_ASSIGN(SimplePolicyHandler);
100 }; 100 };
101 101
102 // Implements additional checks for policies that are lists of extension IDs.
103 class ExtensionListPolicyHandler : public TypeCheckingPolicyHandler {
104 public:
105 ExtensionListPolicyHandler(const char* policy_name,
106 const char* pref_path,
107 bool allow_wildcards);
108 virtual ~ExtensionListPolicyHandler();
109
110 // ConfigurationPolicyHandler methods:
111 virtual bool CheckPolicySettings(const PolicyMap& policies,
112 PolicyErrorMap* errors) OVERRIDE;
113 virtual void ApplyPolicySettings(const PolicyMap& policies,
114 PrefValueMap* prefs) OVERRIDE;
115
116 protected:
117 const char* pref_path() const;
118
119 // Runs sanity checks on the policy value and returns it in |extension_ids|.
120 bool CheckAndGetList(const PolicyMap& policies,
121 PolicyErrorMap* errors,
122 const base::ListValue** extension_ids);
123
124 private:
125 const char* pref_path_;
126 bool allow_wildcards_;
127
128 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler);
129 };
130
102 // ConfigurationPolicyHandler for the SyncDisabled policy. 131 // ConfigurationPolicyHandler for the SyncDisabled policy.
103 class SyncPolicyHandler : public TypeCheckingPolicyHandler { 132 class SyncPolicyHandler : public TypeCheckingPolicyHandler {
104 public: 133 public:
105 SyncPolicyHandler(); 134 SyncPolicyHandler();
106 virtual ~SyncPolicyHandler(); 135 virtual ~SyncPolicyHandler();
107 136
108 // ConfigurationPolicyHandler methods: 137 // ConfigurationPolicyHandler methods:
109 virtual void ApplyPolicySettings(const PolicyMap& policies, 138 virtual void ApplyPolicySettings(const PolicyMap& policies,
110 PrefValueMap* prefs) OVERRIDE; 139 PrefValueMap* prefs) OVERRIDE;
111 140
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 private: 350 private:
322 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, 351 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies,
323 PrefValueMap* prefs); 352 PrefValueMap* prefs);
324 353
325 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); 354 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler);
326 }; 355 };
327 356
328 } // namespace policy 357 } // namespace policy
329 358
330 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 359 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698