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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 1240543003: Remove NPAPI command line flags entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments 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 eadffcc5d6eb2f1504669960abe4e6db698c1e0d..02c6ff9f8fc0b93f084fadcf0e5359ce649d98c4 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -794,27 +794,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_;
}
@@ -873,8 +866,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