Index: chrome/browser/plugins/plugin_policy_handler.h |
diff --git a/chrome/browser/plugins/plugin_policy_handler.h b/chrome/browser/plugins/plugin_policy_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4d6fcc0b89556987fee384e88f8e2a985bbc8dae |
--- /dev/null |
+++ b/chrome/browser/plugins/plugin_policy_handler.h |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |
+#define CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |
+ |
+#include <map> |
+#include <set> |
+#include <vector> |
+ |
+#include "base/macros.h" |
+#include "chrome/browser/plugins/plugin_prefs.h" |
+#include "components/content_settings/core/common/content_settings.h" |
+#include "components/policy/core/browser/configuration_policy_handler.h" |
+#include "components/policy/policy_constants.h" |
+#include "components/prefs/pref_value_map.h" |
+ |
+// Migrates values of deprecated plugin policies into their new counterpars. |
+// It reads the set of EnabledPlugins and DisabledPlugins and updates the Flash |
+// default behavior and PDF plugin behavior. All other values in the list are |
+// ignored. The string matching rules are not trying to catch edge cases like |
Bernhard Bauer
2016/10/14 11:49:46
This comments needs updating.
pastarmovj
2016/10/14 12:38:59
Yes. No need for the explanation anymore.
|
+// matching "Shockwave Flash Player" by "????????*Player". Only the direct |
+// mentioning of "PDF" and "FLASH" or the wildcard "*" element are migrated to |
+// the new policies. |
+class PluginPolicyHandler : public policy::ConfigurationPolicyHandler { |
+ public: |
+ PluginPolicyHandler(); |
+ ~PluginPolicyHandler() override; |
Bernhard Bauer
2016/10/14 11:49:46
If you have a protected section anyway, move the d
pastarmovj
2016/10/14 12:38:59
Nope. VC doesn't like it
ninja -t msvc -e enviro
Bernhard Bauer
2016/10/14 15:27:05
Oh right. For posteriority, I think this is becaus
|
+ |
+ protected: |
+ bool CheckPolicySettings(const policy::PolicyMap& policies, |
+ policy::PolicyErrorMap* errors) override; |
+ void ApplyPolicySettings(const policy::PolicyMap& policies, |
+ PrefValueMap* prefs) override; |
+ |
+ private: |
+ void ProcessPolicy(const policy::PolicyMap& policies, |
+ PrefValueMap* prefs, |
+ const std::string& policy, |
+ bool disable_pdf_plugin, |
+ ContentSetting flash_content_setting); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PluginPolicyHandler); |
+}; |
+ |
+#endif // CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_ |