diff options
author | wfh <wfh@chromium.org> | 2015-04-10 19:24:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-11 02:24:30 +0000 |
commit | 26d09db19381c2236a2890c045761465c78bc958 (patch) | |
tree | abafedd0ec0c700d3a9a91d8574ea782c3ae902e /content/browser/plugin_service_impl.cc | |
parent | cd7a39ac205a3c9c8110ef9f2d42f44196fa49c9 (diff) | |
download | chromium_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.cc | 10 |
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) |