| 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_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "components/policy/core/browser/configuration_policy_handler.h" | 10 #include "components/policy/core/browser/configuration_policy_handler.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class NativeMessagingHostListPolicyHandler | 21 class NativeMessagingHostListPolicyHandler |
| 22 : public policy::TypeCheckingPolicyHandler { | 22 : public policy::TypeCheckingPolicyHandler { |
| 23 public: | 23 public: |
| 24 NativeMessagingHostListPolicyHandler(const char* policy_name, | 24 NativeMessagingHostListPolicyHandler(const char* policy_name, |
| 25 const char* pref_path, | 25 const char* pref_path, |
| 26 bool allow_wildcards); | 26 bool allow_wildcards); |
| 27 virtual ~NativeMessagingHostListPolicyHandler(); | 27 virtual ~NativeMessagingHostListPolicyHandler(); |
| 28 | 28 |
| 29 // ConfigurationPolicyHandler methods: | 29 // ConfigurationPolicyHandler methods: |
| 30 virtual bool CheckPolicySettings(const policy::PolicyMap& policies, | 30 virtual bool CheckPolicySettings(const policy::PolicyMap& policies, |
| 31 policy::PolicyErrorMap* errors) OVERRIDE; | 31 policy::PolicyErrorMap* errors) override; |
| 32 virtual void ApplyPolicySettings(const policy::PolicyMap& policies, | 32 virtual void ApplyPolicySettings(const policy::PolicyMap& policies, |
| 33 PrefValueMap* prefs) OVERRIDE; | 33 PrefValueMap* prefs) override; |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 const char* pref_path() const; | 36 const char* pref_path() const; |
| 37 | 37 |
| 38 // Runs sanity checks on the policy value and returns it in |extension_ids|. | 38 // Runs sanity checks on the policy value and returns it in |extension_ids|. |
| 39 bool CheckAndGetList(const policy::PolicyMap& policies, | 39 bool CheckAndGetList(const policy::PolicyMap& policies, |
| 40 policy::PolicyErrorMap* errors, | 40 policy::PolicyErrorMap* errors, |
| 41 scoped_ptr<base::ListValue>* extension_ids); | 41 scoped_ptr<base::ListValue>* extension_ids); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 const char* pref_path_; | 44 const char* pref_path_; |
| 45 bool allow_wildcards_; | 45 bool allow_wildcards_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(NativeMessagingHostListPolicyHandler); | 47 DISALLOW_COPY_AND_ASSIGN(NativeMessagingHostListPolicyHandler); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace extensions | 50 } // namespace extensions |
| 51 | 51 |
| 52 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDL
ER_H_ | 52 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDL
ER_H_ |
| OLD | NEW |