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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 1248363003: Merge M45: Remove NPAPI command line flags entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 5 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
« no previous file with comments | « content/browser/plugin_browsertest.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_service_impl.cc
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 93140c27ef88a06e8a1539c2463f5b760dbcc7cc..18e537b04673d704e25af1137e66f919fb252c40 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -793,27 +793,20 @@ 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_ = GetContentClient()->browser()->IsNPAPIEnabled();
#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_;
}
@@ -872,8 +865,8 @@ bool PluginServiceImpl::IsPluginWindow(HWND window) {
bool PluginServiceImpl::PpapiDevChannelSupported(
BrowserContext* browser_context,
const GURL& document_url) {
- return content::GetContentClient()->browser()->
- IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url);
+ return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs(
+ browser_context, document_url);
}
} // namespace content
« no previous file with comments | « content/browser/plugin_browsertest.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698