diff options
Diffstat (limited to 'chrome/browser/tab_contents/render_view_host_manager.cc')
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_manager.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc index 8883540..664b7f5 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.cc +++ b/chrome/browser/tab_contents/render_view_host_manager.cc @@ -310,9 +310,15 @@ bool RenderViewHostManager::ShouldSwapProcessesForNavigation( // For security, we should transition between processes when one is a DOM UI // page and one isn't. Profile* profile = delegate_->GetControllerForRenderManager().profile(); - if (DOMUIFactory::UseDOMUIForURL(profile, cur_entry->url()) != - DOMUIFactory::UseDOMUIForURL(profile, new_entry->url())) - return true; + if (DOMUIFactory::UseDOMUIForURL(profile, cur_entry->url())) { + // Force swap if it's not an acceptable URL for DOM UI. + if (!DOMUIFactory::IsURLAcceptableForDOMUI(profile, new_entry->url())) + return true; + } else { + // Force swap if it's a DOM UI URL. + if (DOMUIFactory::UseDOMUIForURL(profile, new_entry->url())) + return true; + } // Also, we must switch if one is an extension and the other is not the exact // same extension. |