Index: chrome/browser/tab_contents/render_view_host_manager.cc |
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc |
index 888354030b8038d9dc3ddfb2085292aadcc0aa69..664b7f50e94ca0ee1fa2c3f9bbf8bf4b9149002d 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. |