Index: content/browser/plugin_service_impl.cc |
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc |
index eadffcc5d6eb2f1504669960abe4e6db698c1e0d..2503529209838e6bf295361bd480002c3a72bf72 100644 |
--- a/content/browser/plugin_service_impl.cc |
+++ b/content/browser/plugin_service_impl.cc |
@@ -794,27 +794,21 @@ void PluginServiceImpl::GetInternalPlugins( |
} |
bool PluginServiceImpl::NPAPIPluginsSupported() { |
- static bool command_line_checked = false; |
- |
- if (!command_line_checked) { |
#if defined(OS_WIN) || defined(OS_MACOSX) |
- const base::CommandLine* command_line = |
- base::CommandLine::ForCurrentProcess(); |
- npapi_plugins_enabled_ = |
- command_line->HasSwitch(switches::kEnableNpapiForTesting); |
+ npapi_plugins_enabled_ = |
+ content::GetContentClient()->browser()->IsNPAPIEnabled(); |
jam
2015/07/20 16:36:22
nit: no content::
Will Harris
2015/07/20 16:54:50
Done, also below where I stole this from :)
|
#if defined(OS_WIN) |
- // NPAPI plugins don't play well with Win32k renderer lockdown. |
- if (npapi_plugins_enabled_) |
- DisableWin32kRendererLockdown(); |
+ // NPAPI plugins don't play well with Win32k renderer lockdown. |
+ if (npapi_plugins_enabled_) |
+ DisableWin32kRendererLockdown(); |
#endif |
- NPAPIPluginStatus status = |
- npapi_plugins_enabled_ ? NPAPI_STATUS_ENABLED : NPAPI_STATUS_DISABLED; |
+ NPAPIPluginStatus status = |
+ npapi_plugins_enabled_ ? NPAPI_STATUS_ENABLED : NPAPI_STATUS_DISABLED; |
#else |
- NPAPIPluginStatus status = NPAPI_STATUS_UNSUPPORTED; |
+ NPAPIPluginStatus status = NPAPI_STATUS_UNSUPPORTED; |
#endif |
- UMA_HISTOGRAM_ENUMERATION("Plugin.NPAPIStatus", status, |
- NPAPI_STATUS_ENUM_COUNT); |
- } |
+ UMA_HISTOGRAM_ENUMERATION("Plugin.NPAPIStatus", status, |
+ NPAPI_STATUS_ENUM_COUNT); |
return npapi_plugins_enabled_; |
} |