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

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

Issue 2474713003: Migrate enabled state of plugins into specialized Flash and PDF prefs. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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 | « no previous file | chrome/browser/plugins/plugin_prefs.cc » ('j') | chrome/browser/plugins/plugin_prefs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_policy_handler.cc
diff --git a/chrome/browser/plugins/plugin_policy_handler.cc b/chrome/browser/plugins/plugin_policy_handler.cc
index 06556d1ad3cb3d68059d328be0d402c42f6412d1..54fe7b7f41a0f3fb58bf9b1c88bd1686349981d0 100644
--- a/chrome/browser/plugins/plugin_policy_handler.cc
+++ b/chrome/browser/plugins/plugin_policy_handler.cc
@@ -20,8 +20,6 @@
namespace {
-const char kAdobeFlashPlayerName[] = "Adobe Flash Player";
-
// Retrieves a list typed policy or nullptr if not present or not a list.
const base::ListValue* GetListPolicy(const policy::PolicyMap& policies,
const std::string& policy) {
@@ -60,7 +58,7 @@ void PluginPolicyHandler::ProcessPolicy(const policy::PolicyMap& policies,
prefs::kPluginsAlwaysOpenPdfExternally,
base::MakeUnique<base::FundamentalValue>(disable_pdf_plugin));
}
- if ((base::MatchPattern(kAdobeFlashPlayerName, plugin) ||
+ if ((base::MatchPattern(content::kAdobeFlashPlayerPluginName, plugin) ||
base::MatchPattern(content::kFlashPluginName, plugin)) &&
!policies.GetValue(policy::key::kDefaultPluginsSetting)) {
prefs->SetValue(
@@ -110,7 +108,7 @@ void PluginPolicyHandler::ApplyPolicySettings(const policy::PolicyMap& policies,
!policies.GetValue(policy::key::kAlwaysOpenPdfExternally)) {
prefs->RemoveValue(prefs::kPluginsAlwaysOpenPdfExternally);
}
- if ((base::MatchPattern(kAdobeFlashPlayerName, plugin) ||
+ if ((base::MatchPattern(content::kAdobeFlashPlayerPluginName, plugin) ||
base::MatchPattern(content::kFlashPluginName, plugin)) &&
!policies.GetValue(policy::key::kDefaultPluginsSetting)) {
prefs->RemoveValue(prefs::kManagedDefaultPluginsSetting);
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_prefs.cc » ('j') | chrome/browser/plugins/plugin_prefs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698