From 3a8eecb2bb859491b344be321abb4ff3d2b7f0f3 Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Thu, 22 Apr 2010 23:56:30 +0000 Subject: Implement app process model isolation. The process grouping logic is unfortunately duplicated in SiteInstance and RenderView. URLs that are part of extension X's web extent get converted into a pseudo URL of the form chrome-extension://X/path. This groups pages from an extension app and its offline resources into the same process. The rest is mostly plumbing and passing data around. BUG=41273 Review URL: http://codereview.chromium.org/1735004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45384 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browsing_instance.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chrome/browser/browsing_instance.cc') diff --git a/chrome/browser/browsing_instance.cc b/chrome/browser/browsing_instance.cc index ff3346a..aba73b2 100644 --- a/chrome/browser/browsing_instance.cc +++ b/chrome/browser/browsing_instance.cc @@ -46,7 +46,7 @@ bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) { BrowsingInstance::SiteInstanceMap* BrowsingInstance::GetSiteInstanceMap( Profile* profile, const GURL& url) { - if (!ShouldUseProcessPerSite(url)) { + if (!ShouldUseProcessPerSite(SiteInstance::GetEffectiveURL(profile, url))) { // Not using process-per-site, so use a map specific to this instance. return &site_instance_map_; } @@ -59,7 +59,8 @@ BrowsingInstance::SiteInstanceMap* BrowsingInstance::GetSiteInstanceMap( } bool BrowsingInstance::HasSiteInstance(const GURL& url) { - std::string site = SiteInstance::GetSiteForURL(url).possibly_invalid_spec(); + std::string site = + SiteInstance::GetSiteForURL(profile_, url).possibly_invalid_spec(); SiteInstanceMap* map = GetSiteInstanceMap(profile_, url); SiteInstanceMap::iterator i = map->find(site); @@ -67,7 +68,8 @@ bool BrowsingInstance::HasSiteInstance(const GURL& url) { } SiteInstance* BrowsingInstance::GetSiteInstanceForURL(const GURL& url) { - std::string site = SiteInstance::GetSiteForURL(url).possibly_invalid_spec(); + std::string site = + SiteInstance::GetSiteForURL(profile_, url).possibly_invalid_spec(); SiteInstanceMap* map = GetSiteInstanceMap(profile_, url); SiteInstanceMap::iterator i = map->find(site); -- cgit v1.1