summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/render_view_host_manager.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-25 19:40:10 +0000
committerBen Murdoch <benm@google.com>2010-12-03 13:52:53 +0000
commit4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7 (patch)
tree938665d93a11fe7a6d0124e3c1e020d1f9d3f947 /chrome/browser/tab_contents/render_view_host_manager.cc
parent7c627d87728a355737862918d144f98f69406954 (diff)
downloadexternal_chromium-4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7.zip
external_chromium-4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7.tar.gz
external_chromium-4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7.tar.bz2
Merge Chromium at r66597: Initial merge by git.
Change-Id: I9639f8a997f90ec219573aa22a49f5dbde78cc7b
Diffstat (limited to 'chrome/browser/tab_contents/render_view_host_manager.cc')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc12
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.