OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <set> |
| 10 #include <vector> |
| 11 |
| 12 #include "base/macros.h" |
| 13 #include "chrome/browser/plugins/plugin_prefs.h" |
| 14 #include "components/content_settings/core/common/content_settings.h" |
| 15 #include "components/policy/core/browser/configuration_policy_handler.h" |
| 16 #include "components/policy/policy_constants.h" |
| 17 #include "components/prefs/pref_value_map.h" |
| 18 |
| 19 // Migrates values of deprecated plugin policies into their new counterpars. |
| 20 // It reads the set of EnabledPlugins and DisabledPlugins and updates the Flash |
| 21 // default behavior and PDF plugin behavior. All other values in the list are |
| 22 // ignored. |
| 23 class PluginPolicyHandler : public policy::ConfigurationPolicyHandler { |
| 24 public: |
| 25 PluginPolicyHandler(); |
| 26 ~PluginPolicyHandler() override; |
| 27 |
| 28 protected: |
| 29 bool CheckPolicySettings(const policy::PolicyMap& policies, |
| 30 policy::PolicyErrorMap* errors) override; |
| 31 void ApplyPolicySettings(const policy::PolicyMap& policies, |
| 32 PrefValueMap* prefs) override; |
| 33 |
| 34 private: |
| 35 void ProcessPolicy(const policy::PolicyMap& policies, |
| 36 PrefValueMap* prefs, |
| 37 const std::string& policy, |
| 38 bool disable_pdf_plugin, |
| 39 ContentSetting flash_content_setting); |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(PluginPolicyHandler); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |
OLD | NEW |