Index: content/browser/plugin_service_impl.cc |
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc |
index 4c52514b8eb2f52576565b84ac29765a93c49c6f..286bbd41ce85fe7522a35d5152690614cf3df25a 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) |