| 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 COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "components/policy/core/browser/configuration_policy_handler.h" | 12 #include "components/policy/core/browser/configuration_policy_handler.h" |
| 13 | 13 |
| 14 namespace policy { | 14 namespace policy { |
| 15 | 15 |
| 16 // ConfigurationPolicyHandler for the DefaultSearchEncodings policy. | |
| 17 class DefaultSearchEncodingsPolicyHandler | |
| 18 : public TypeCheckingPolicyHandler { | |
| 19 public: | |
| 20 DefaultSearchEncodingsPolicyHandler(); | |
| 21 ~DefaultSearchEncodingsPolicyHandler() override; | |
| 22 | |
| 23 // ConfigurationPolicyHandler methods: | |
| 24 void ApplyPolicySettings(const PolicyMap& policies, | |
| 25 PrefValueMap* prefs) override; | |
| 26 | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(DefaultSearchEncodingsPolicyHandler); | |
| 29 }; | |
| 30 | |
| 31 // ConfigurationPolicyHandler for the default search policies. | 16 // ConfigurationPolicyHandler for the default search policies. |
| 32 class DefaultSearchPolicyHandler : public ConfigurationPolicyHandler { | 17 class DefaultSearchPolicyHandler : public ConfigurationPolicyHandler { |
| 33 public: | 18 public: |
| 34 DefaultSearchPolicyHandler(); | 19 DefaultSearchPolicyHandler(); |
| 35 ~DefaultSearchPolicyHandler() override; | 20 ~DefaultSearchPolicyHandler() override; |
| 36 | 21 |
| 37 // ConfigurationPolicyHandler methods: | 22 // ConfigurationPolicyHandler methods: |
| 38 bool CheckPolicySettings(const PolicyMap& policies, | 23 bool CheckPolicySettings(const PolicyMap& policies, |
| 39 PolicyErrorMap* errors) override; | 24 PolicyErrorMap* errors) override; |
| 40 void ApplyPolicySettings(const PolicyMap& policies, | 25 void ApplyPolicySettings(const PolicyMap& policies, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 57 |
| 73 // The ConfigurationPolicyHandler handlers for each default search policy. | 58 // The ConfigurationPolicyHandler handlers for each default search policy. |
| 74 std::vector<std::unique_ptr<TypeCheckingPolicyHandler>> handlers_; | 59 std::vector<std::unique_ptr<TypeCheckingPolicyHandler>> handlers_; |
| 75 | 60 |
| 76 DISALLOW_COPY_AND_ASSIGN(DefaultSearchPolicyHandler); | 61 DISALLOW_COPY_AND_ASSIGN(DefaultSearchPolicyHandler); |
| 77 }; | 62 }; |
| 78 | 63 |
| 79 } // namespace policy | 64 } // namespace policy |
| 80 | 65 |
| 81 #endif // COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ | 66 #endif // COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_POLICY_HANDLER_H_ |
| OLD | NEW |