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

Side by Side Diff: chrome/browser/plugins/enable_npapi_plugins_policy_handler.cc

Issue 1158423003: Disable NPAPI support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove enterprise policy override based on revert of 26d09db Created 5 years, 6 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 2015 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 #include "chrome/browser/plugins/enable_npapi_plugins_policy_handler.h"
6
7 #include "base/logging.h"
8 #include "base/prefs/pref_value_map.h"
9 #include "base/values.h"
10 #include "chrome/common/pref_names.h"
11 #include "components/policy/core/browser/policy_error_map.h"
12 #include "components/policy/core/common/policy_map.h"
13 #include "policy/policy_constants.h"
14
15 namespace policy {
16
17 EnableNpapiPluginsPolicyHandler::EnableNpapiPluginsPolicyHandler() {
18 }
19
20 EnableNpapiPluginsPolicyHandler::~EnableNpapiPluginsPolicyHandler() {
21 }
22
23 void EnableNpapiPluginsPolicyHandler::ApplyPolicySettings(
24 const PolicyMap& policies,
25 PrefValueMap* prefs) {
26 const std::string plugin_policies[] = {key::kEnabledPlugins,
27 key::kPluginsAllowedForUrls,
28 key::kPluginsBlockedForUrls,
29 key::kDisabledPluginsExceptions,
30 key::kDisabledPlugins};
31
32 for (auto policy : plugin_policies) {
33 if (policies.GetValue(policy)) {
34 prefs->SetBoolean(prefs::kEnableNpapi, true);
35 break;
36 }
37 }
38 }
39
40 bool EnableNpapiPluginsPolicyHandler::CheckPolicySettings(
41 const PolicyMap& policies,
42 PolicyErrorMap* prefs) {
43 return true;
44 }
45
46 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698