OLD | NEW |
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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/values.h" | 12 #include "base/values.h" |
12 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 13 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
13 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
14 | 15 |
15 class PrefValueMap; | 16 class PrefValueMap; |
16 | 17 |
17 namespace policy { | 18 namespace policy { |
18 | 19 |
19 class PolicyErrorMap; | 20 class PolicyErrorMap; |
20 class PolicyMap; | 21 class PolicyMap; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 PolicyErrorMap* errors) OVERRIDE; | 113 PolicyErrorMap* errors) OVERRIDE; |
113 virtual void ApplyPolicySettings(const PolicyMap& policies, | 114 virtual void ApplyPolicySettings(const PolicyMap& policies, |
114 PrefValueMap* prefs) OVERRIDE; | 115 PrefValueMap* prefs) OVERRIDE; |
115 | 116 |
116 protected: | 117 protected: |
117 const char* pref_path() const; | 118 const char* pref_path() const; |
118 | 119 |
119 // Runs sanity checks on the policy value and returns it in |extension_ids|. | 120 // Runs sanity checks on the policy value and returns it in |extension_ids|. |
120 bool CheckAndGetList(const PolicyMap& policies, | 121 bool CheckAndGetList(const PolicyMap& policies, |
121 PolicyErrorMap* errors, | 122 PolicyErrorMap* errors, |
122 const base::ListValue** extension_ids); | 123 scoped_ptr<base::ListValue>* extension_ids); |
123 | 124 |
124 private: | 125 private: |
125 const char* pref_path_; | 126 const char* pref_path_; |
126 bool allow_wildcards_; | 127 bool allow_wildcards_; |
127 | 128 |
128 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler); | 129 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler); |
129 }; | 130 }; |
130 | 131 |
131 // Implements additional checks for policies that are lists of extension | 132 // Implements additional checks for policies that are lists of extension |
132 // URLPatterns. | 133 // URLPatterns. |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 private: | 400 private: |
400 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, | 401 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, |
401 PrefValueMap* prefs); | 402 PrefValueMap* prefs); |
402 | 403 |
403 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); | 404 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); |
404 }; | 405 }; |
405 | 406 |
406 } // namespace policy | 407 } // namespace policy |
407 | 408 |
408 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ | 409 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ |
OLD | NEW |