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

Unified Diff: content/browser/site_instance.cc

Issue 7063015: Swap processes on reload if a hosted app has been installed/uninstalled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile on Windows Created 9 years, 7 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
« no previous file with comments | « content/browser/site_instance.h ('k') | content/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance.cc
diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc
index f96e3b2a6d7671d4e1e5d0d85e0a74fcf432a6c6..610de02d61a1ff66125775e267477ac9dc0dc67b 100644
--- a/content/browser/site_instance.cc
+++ b/content/browser/site_instance.cc
@@ -116,6 +116,18 @@ SiteInstance* SiteInstance::GetRelatedSiteInstance(const GURL& url) {
return browsing_instance_->GetSiteInstanceForURL(url);
}
+bool SiteInstance::HasWrongProcessForURL(const GURL& url) const {
+ // Having no process isn't a problem, since we'll assign it correctly.
+ if (!HasProcess())
+ return false;
+
+ // If the effective URL is an extension (e.g., for hosted apps) but the
+ // process is not (or vice versa), make sure we notice and fix it.
+ GURL effective_url = GetEffectiveURL(browsing_instance_->profile(), url);
+ return effective_url.SchemeIs(chrome::kExtensionScheme) !=
+ process_->is_extension_process();
+}
+
/*static*/
SiteInstance* SiteInstance::CreateSiteInstance(Profile* profile) {
return new SiteInstance(new BrowsingInstance(profile));
« no previous file with comments | « content/browser/site_instance.h ('k') | content/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698