Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index aef2207674ee7aca7f20337151b20a16de39fe68..78ec02d4a644ecf5a8600758e40233c89809632d 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -2480,16 +2480,19 @@ WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
return plugin; |
} |
- // TODO(fsamuel): Remove this once upstreaming of the new browser plugin is |
- // complete. |
- if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginNewMimeType) { |
- return content::BrowserPluginManager::Get()-> |
- CreateBrowserPlugin(this, frame, params); |
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
+ if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) { |
+ if (cmd_line->HasSwitch(switches::kEnableBrowserPluginOldImplementation)) { |
+ // TODO(fsamuel): Remove this once upstreaming of the new browser plugin |
+ // is complete. |
+ return content::old::BrowserPlugin::Create(this, frame, params); |
+ } else { |
+ return content::BrowserPluginManager::Get()->CreateBrowserPlugin(this, |
+ frame, |
+ params); |
+ } |
} |
- if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) |
- return content::old::BrowserPlugin::Create(this, frame, params); |
- |
webkit::WebPluginInfo info; |
std::string mime_type; |
bool found = GetPluginInfo(params.url, frame->top()->document().url(), |