| 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()))
|
| 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;
|
| }
|
|
|