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

Unified Diff: chrome/browser/browsing_instance.cc

Issue 1723016: Force extensions to run in their shared processes, even with --process-per-tab. (Closed)
Patch Set: feedback Created 10 years, 8 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/tab_contents/render_view_host_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_instance.cc
diff --git a/chrome/browser/browsing_instance.cc b/chrome/browser/browsing_instance.cc
index aba73b29159ef262af1ddabbc964fa523710b05c..22c6ab5786b5cceffc32307d747f2c45f076ee96 100644
--- a/chrome/browser/browsing_instance.cc
+++ b/chrome/browser/browsing_instance.cc
@@ -22,6 +22,12 @@ bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
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.
+ 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
@@ -30,10 +36,9 @@ bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) {
// 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) ||
- url.SchemeIs(chrome::kExtensionScheme))
+ if (url.SchemeIs(chrome::kChromeUIScheme))
// Always consolidate instances of the new tab page (and instances of any
- // other internal resource urls), as well as extensions.
+ // other internal resource urls.
return true;
// TODO(creis): List any other special cases that we want to limit to a
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698