Commit ae7b974f authored by zork@chromium.org's avatar zork@chromium.org

Remove kEnableBrowserPluginForAllViewTypes flag

BUG=362796

Review URL: https://codereview.chromium.org/236073004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266783 0039d316-1c4b-4281-b951-d872f2087c98
parent 67eab64f
......@@ -840,9 +840,7 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
/// TODO(fsamuel): In the future, certain types of GuestViews won't require
// extension bindings. At that point, we should clear |extension_id| instead
// of exiting early.
if (!service->GetExtensionById(extension_id, false) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes)) {
if (!service->GetExtensionById(extension_id, false)) {
NOTREACHED();
return;
}
......
......@@ -47,7 +47,6 @@ void ShowBadFlagsPrompt(Browser* browser) {
switches::kSingleProcess,
// These flags disable or undermine the Same Origin Policy.
switches::kEnableBrowserPluginForAllViewTypes,
switches::kTrustedSpdyProxy,
translate::switches::kTranslateSecurityOrigin,
......
......@@ -474,9 +474,6 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
WebPlugin** plugin) {
std::string orig_mime_type = params.mimeType.utf8();
if (orig_mime_type == content::kBrowserPluginMimeType) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes))
return false;
WebDocument document = frame->document();
const Extension* extension =
GetExtensionByOrigin(document.securityOrigin());
......@@ -1372,10 +1369,6 @@ ChromeContentRendererClient::OverrideSpeechSynthesizer(
bool ChromeContentRendererClient::AllowBrowserPlugin(
blink::WebPluginContainer* container) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes))
return true;
// If this |BrowserPlugin| <object> in the |container| is not inside a
// <webview>/<adview> shadowHost, we disable instantiating this plugin. This
// is to discourage and prevent developers from accidentally attaching
......
......@@ -245,11 +245,6 @@ class BrowserPluginHostTest : public ContentBrowserTest {
ContentBrowserTest::TearDown();
}
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
// Enable browser plugin in content_shell for running test.
command_line->AppendSwitch(switches::kEnableBrowserPluginForAllViewTypes);
}
static void SimulateSpaceKeyPress(WebContents* web_contents) {
SimulateKeyPress(web_contents,
ui::VKEY_SPACE,
......
......@@ -1055,7 +1055,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableADTSStreamParser,
switches::kEnableBeginFrameScheduling,
switches::kEnableBleedingEdgeRenderingFastPaths,
switches::kEnableBrowserPluginForAllViewTypes,
switches::kEnableCompositingForFixedPosition,
switches::kEnableCompositingForTransition,
switches::kEnableDeferredImageDecoding,
......
......@@ -351,10 +351,6 @@ const char kEnableAccessibilityLogging[] = "enable-accessibility-logging";
// Use a BeginFrame signal from browser to renderer to schedule rendering.
const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling";
// Enables browser plugin for all types of pages.
const char kEnableBrowserPluginForAllViewTypes[] =
"enable-browser-plugin-for-all-view-types";
// Enable the creation of compositing layers for fixed position
// elements. Three options are needed to support four possible scenarios:
// 1. Default (disabled)
......
......@@ -108,7 +108,6 @@ CONTENT_EXPORT extern const char kEnableLayerSquashing[];
CONTENT_EXPORT extern const char kEnableContainerCulling[];
extern const char kEnableAccessibilityLogging[];
CONTENT_EXPORT extern const char kEnableBeginFrameScheduling[];
CONTENT_EXPORT extern const char kEnableBrowserPluginForAllViewTypes[];
CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];
CONTENT_EXPORT extern const char kEnableCompositingForTransition[];
CONTENT_EXPORT extern const char kEnableDeferredImageDecoding[];
......
......@@ -118,13 +118,6 @@ bool ShellContentRendererClient::OverrideCreatePlugin(
WebLocalFrame* frame,
const WebPluginParams& params,
WebPlugin** plugin) {
std::string mime_type = params.mimeType.utf8();
if (mime_type == content::kBrowserPluginMimeType) {
// Allow browser plugin in content_shell only if it is forced by flag.
// Returning true here disables the plugin.
return !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes);
}
return false;
}
......@@ -203,13 +196,7 @@ void ShellContentRendererClient::WebTestProxyCreated(RenderView* render_view,
bool ShellContentRendererClient::AllowBrowserPlugin(
blink::WebPluginContainer* container) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes)) {
// Allow BrowserPlugin if forced by command line flag. This is generally
// true for tests.
return true;
}
return ContentRendererClient::AllowBrowserPlugin(container);
return true;
}
} // namespace content
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment