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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 1071713004: Enable NPAPI if policy has plugin policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win and mac only Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698