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

Unified Diff: chrome/browser/browsing_instance.cc

Issue 6106003: Similar as extension, DOM UI needs to be created in its own process.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « no previous file | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_instance.cc
===================================================================
--- chrome/browser/browsing_instance.cc (revision 70813)
+++ chrome/browser/browsing_instance.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "chrome/browser/dom_ui/dom_ui_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/common/chrome_switches.h"
@@ -28,28 +29,18 @@
if (command_line.HasSwitch(switches::kProcessPerSite))
return true;
- if (url.SchemeIs(chrome::kExtensionScheme)) {
- // Always consolidate extensions regardless of the command line, because
- // they will break if split into multiple processes.
+ // We want to consolidate particular sites like extensions and DOMUI whether
+ // it is in process-per-tab or process-per-site-instance.
+ // Note that --single-process may have been specified, but that affects the
+ // process creation logic in RenderProcessHost, so we do not need to worry
+ // about it here.
+
+ if (url.SchemeIs(chrome::kExtensionScheme))
return true;
- }
- if (!command_line.HasSwitch(switches::kProcessPerTab)) {
- // We are not in process-per-site or process-per-tab, so we must be in the
- // default (process-per-site-instance). Only use the process-per-site
- // logic for particular sites that we want to consolidate.
- // Note that --single-process may have been specified, but that affects the
- // process creation logic in RenderProcessHost, so we do not need to worry
- // about it here.
- if (url.SchemeIs(chrome::kChromeUIScheme))
- // Always consolidate instances of the new tab page (and instances of any
- // other internal resource urls.
- return true;
+ if (DOMUIFactory::UseDOMUIForURL(profile_, url))
+ return true;
- // TODO(creis): List any other special cases that we want to limit to a
- // single process for all instances.
- }
-
// In all other cases, don't use process-per-site logic.
return false;
}
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698