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

Unified Diff: content/renderer/render_view_impl.cc

Issue 11052019: <browser> Make new implementation the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove flag from chrome://flags, add platform app check for both implementation. Created 8 years, 2 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
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(),
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_browsertest.cc ('k') | content/test/data/browser_plugin_embedder.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698