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

Side by Side Diff: chrome/browser/plugins/plugin_policy_handler.h

Issue 2410113002: Add migration code for the EnabledPlugins and DisabledPlugins policies. (Closed)
Patch Set: Adjust policy tests. 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 unified diff | Download patch
OLDNEW
(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. The string matching rules are not trying to catch edge cases like
23 // matching "Shockwave Flash Player" by "????????*Player". Only the direct
24 // mentioning of "PDF" and "FLASH" or the wildcard "*" element are migrated to
25 // the new policies.
Bernhard Bauer 2016/10/12 15:28:49 Hm... wouldn't it actually be _easier_ to just mat
pastarmovj 2016/10/13 13:29:00 We have been advising admins on various bugs to be
Bernhard Bauer 2016/10/13 14:33:08 I don't doubt there are wildcard policies out in t
26 class PluginPolicyHandler : public policy::ConfigurationPolicyHandler {
27 public:
28 PluginPolicyHandler();
29 ~PluginPolicyHandler() override;
30
31 protected:
32 bool CheckPolicySettings(const policy::PolicyMap& policies,
33 policy::PolicyErrorMap* errors) override;
34 void ApplyPolicySettings(const policy::PolicyMap& policies,
35 PrefValueMap* prefs) override;
36
37 private:
38 void ProcessPolicy(const policy::PolicyMap& policies,
39 PrefValueMap* prefs,
40 const std::string& policy,
41 bool disable_pdf_plugin,
42 ContentSetting flash_content_setting);
43
44 DISALLOW_COPY_AND_ASSIGN(PluginPolicyHandler);
45 };
46
47 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_POLICY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698