Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Unified Diff: chrome/browser/plugins/plugin_policy_handler.h

Issue 2410113002: Add migration code for the EnabledPlugins and DisabledPlugins policies. (Closed)
Patch Set: Remove case insensitivity. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/plugins/plugin_policy_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2ef586341b8c6c0717a0fab18e77fff10c2be8a9
--- /dev/null
+++ b/chrome/browser/plugins/plugin_policy_handler.h
@@ -0,0 +1,44 @@
+// 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.
+class PluginPolicyHandler : public policy::ConfigurationPolicyHandler {
+ public:
+ PluginPolicyHandler();
+ ~PluginPolicyHandler() override;
+
+ 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_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/plugins/plugin_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698