summaryrefslogtreecommitdiffstats
path: root/content/browser/plugin_service_impl.cc
diff options
context:
space:
mode:
authorwfh <wfh@chromium.org>2015-04-10 19:24:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-11 02:24:30 +0000
commit26d09db19381c2236a2890c045761465c78bc958 (patch)
treeabafedd0ec0c700d3a9a91d8574ea782c3ae902e /content/browser/plugin_service_impl.cc
parentcd7a39ac205a3c9c8110ef9f2d42f44196fa49c9 (diff)
downloadchromium_src-26d09db19381c2236a2890c045761465c78bc958.zip
chromium_src-26d09db19381c2236a2890c045761465c78bc958.tar.gz
chromium_src-26d09db19381c2236a2890c045761465c78bc958.tar.bz2
Enable NPAPI if policy has plugin policies.
BUG=472648 TEST=manual - verify that NPAPI plugins appear in chrome://plugins when either a machine or user plugin policy is set. Review URL: https://codereview.chromium.org/1071713004 Cr-Commit-Position: refs/heads/master@{#324754}
Diffstat (limited to 'content/browser/plugin_service_impl.cc')
-rw-r--r--content/browser/plugin_service_impl.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 4c52514..286bbd4 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -789,6 +789,9 @@ void PluginServiceImpl::GetInternalPlugins(
}
bool PluginServiceImpl::NPAPIPluginsSupported() {
+ if (npapi_plugins_enabled_)
+ return true;
+
static bool command_line_checked = false;
if (!command_line_checked) {
@@ -812,8 +815,13 @@ void PluginServiceImpl::DisablePluginsDiscoveryForTesting() {
PluginList::Singleton()->DisablePluginsDiscovery();
}
-void PluginServiceImpl::EnableNpapiPluginsForTesting() {
+void PluginServiceImpl::EnableNpapiPlugins() {
npapi_plugins_enabled_ = true;
+ RefreshPlugins();
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(&PluginService::PurgePluginListCache,
+ static_cast<BrowserContext*>(NULL), false));
}
#if defined(OS_MACOSX)