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. 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.
| |
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. | |
26 class PluginPolicyHandler : public policy::ConfigurationPolicyHandler { | |
27 public: | |
28 PluginPolicyHandler(); | |
29 ~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
| |
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_ | |
OLD | NEW |