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

Unified Diff: content/browser/tab_contents/render_view_host_manager.cc

Issue 8033001: Delegate decision what site instances can be rendered in what process to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 3 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 | « content/browser/site_instance_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/render_view_host_manager.cc
diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc
index e486be3fbfb47d4c8749df886dd35b6bbc7739cf..dd2ec438074fb3c5d001646a526ddc29743702e5 100644
--- a/content/browser/tab_contents/render_view_host_manager.cc
+++ b/content/browser/tab_contents/render_view_host_manager.cc
@@ -348,6 +348,8 @@ bool RenderViewHostManager::ShouldSwapProcessesForNavigation(
render_view_host_->site_instance()->site();
content::BrowserContext* browser_context =
delegate_->GetControllerForRenderManager().browser_context();
+ content::ContentBrowserClient* browser =
+ content::GetContentClient()->browser();
const content::WebUIFactory* web_ui_factory = content::WebUIFactory::Get();
if (web_ui_factory->UseWebUIForURL(browser_context, current_url)) {
// Force swap if it's not an acceptable URL for Web UI.
@@ -364,7 +366,7 @@ bool RenderViewHostManager::ShouldSwapProcessesForNavigation(
// Always choose a new process when navigating to extension URLs. The
// process grouping logic will combine all of a given extension's pages
// into the same process.
- if (new_entry->url().SchemeIs(chrome::kExtensionScheme))
+ if (browser->ShouldRunInPrivilegedProcess(new_entry->url()))
jam 2011/09/26 21:08:58 I think this concept of privilieged processes is s
return true;
return false;
@@ -379,8 +381,8 @@ bool RenderViewHostManager::ShouldSwapProcessesForNavigation(
// Also, we must switch if one is an extension and the other is not the exact
// same extension.
- if (cur_entry->url().SchemeIs(chrome::kExtensionScheme) ||
- new_entry->url().SchemeIs(chrome::kExtensionScheme)) {
+ if (browser->ShouldRunInPrivilegedProcess(cur_entry->url()) ||
+ browser->ShouldRunInPrivilegedProcess(new_entry->url())) {
if (cur_entry->url().GetOrigin() != new_entry->url().GetOrigin())
return true;
}
« no previous file with comments | « content/browser/site_instance_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698