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

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

Issue 10825402: View-source URLs should use a separate SiteInstance in all cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: content/browser/web_contents/render_view_host_manager.cc
diff --git a/content/browser/web_contents/render_view_host_manager.cc b/content/browser/web_contents/render_view_host_manager.cc
index a11689187f7932b1b7873746bdbd253cd4471e70..28139565f7b00ade95983997e0f90030413d908a 100644
--- a/content/browser/web_contents/render_view_host_manager.cc
+++ b/content/browser/web_contents/render_view_host_manager.cc
@@ -499,6 +499,12 @@ SiteInstance* RenderViewHostManager::GetSiteInstanceForEntry(
if (entry.restore_type() != NavigationEntryImpl::RESTORE_NONE)
curr_site_instance->SetSite(dest_url);
+ // View-source URLs must use a new SiteInstance and BrowsingInstance.
+ // TODO(nasko): This is the same condition as later in the function. This
+ // should be taken into account when refactoring this method.
+ if (entry.IsViewSourceMode())
+ return SiteInstance::CreateForURL(browser_context, dest_url);
Charlie Reis 2012/08/16 22:28:09 Please move this check between the HasWrongProcess
nasko 2012/08/16 22:59:23 Done.
+
return curr_site_instance;
}

Powered by Google App Engine
This is Rietveld 408576698