OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ |
6 #define CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ | 6 #define CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "components/policy/core/browser/configuration_policy_handler.h" | 8 #include "components/policy/core/browser/configuration_policy_handler.h" |
11 | 9 |
12 namespace base { | 10 namespace base { |
13 class Value; | 11 class ListValue; |
14 } | 12 } |
15 | 13 |
16 namespace policy { | 14 namespace policy { |
17 | 15 |
18 // Handles the ManagedBookmarks policy. | 16 // Handles the ManagedBookmarks policy. |
19 class ManagedBookmarksPolicyHandler : public TypeCheckingPolicyHandler { | 17 class ManagedBookmarksPolicyHandler : public SchemaValidatingPolicyHandler { |
20 public: | 18 public: |
21 static const char kName[]; | 19 static const char kName[]; |
22 static const char kUrl[]; | 20 static const char kUrl[]; |
| 21 static const char kChildren[]; |
23 | 22 |
24 ManagedBookmarksPolicyHandler(); | 23 explicit ManagedBookmarksPolicyHandler(Schema chrome_schema); |
25 virtual ~ManagedBookmarksPolicyHandler(); | 24 virtual ~ManagedBookmarksPolicyHandler(); |
26 | 25 |
27 // ConfigurationPolicyHandler methods: | 26 // ConfigurationPolicyHandler methods: |
28 virtual bool CheckPolicySettings(const PolicyMap& policies, | |
29 PolicyErrorMap* errors) OVERRIDE; | |
30 virtual void ApplyPolicySettings(const PolicyMap& policies, | 27 virtual void ApplyPolicySettings(const PolicyMap& policies, |
31 PrefValueMap* prefs) OVERRIDE; | 28 PrefValueMap* prefs) OVERRIDE; |
32 | 29 |
33 private: | 30 private: |
| 31 void FilterBookmarks(base::ListValue* bookmarks); |
| 32 |
34 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksPolicyHandler); | 33 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksPolicyHandler); |
35 }; | 34 }; |
36 | 35 |
37 } // namespace policy | 36 } // namespace policy |
38 | 37 |
39 #endif // CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ | 38 #endif // CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ |
OLD | NEW |