summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/site_instance.h
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 23:56:30 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 23:56:30 +0000
commit3a8eecb2bb859491b344be321abb4ff3d2b7f0f3 (patch)
tree07f90f564c2c5d92d38f1fdae15597a523ca31c1 /chrome/browser/renderer_host/site_instance.h
parent58bc899f2ffdc14d78b6f209f57415e79837d7a6 (diff)
downloadchromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.zip
chromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.tar.gz
chromium_src-3a8eecb2bb859491b344be321abb4ff3d2b7f0f3.tar.bz2
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
Diffstat (limited to 'chrome/browser/renderer_host/site_instance.h')
-rw-r--r--chrome/browser/renderer_host/site_instance.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/site_instance.h b/chrome/browser/renderer_host/site_instance.h
index 9c2f3f8..4fbbdc8 100644
--- a/chrome/browser/renderer_host/site_instance.h
+++ b/chrome/browser/renderer_host/site_instance.h
@@ -117,7 +117,7 @@ class SiteInstance : public base::RefCounted<SiteInstance>,
// Returns the site for the given URL, which includes only the scheme and
// registered domain. Returns an empty GURL if the URL has no host.
- static GURL GetSiteForURL(const GURL& url);
+ static GURL GetSiteForURL(Profile* profile, const GURL& url);
// Return whether both URLs are part of the same web site, for the purpose of
// assigning them to processes accordingly. The decision is currently based
@@ -126,7 +126,8 @@ class SiteInstance : public base::RefCounted<SiteInstance>,
// the same process if they can communicate with other via JavaScript.
// (e.g., docs.google.com and mail.google.com have DOM access to each other
// if they both set their document.domain properties to google.com.)
- static bool IsSameWebSite(const GURL& url1, const GURL& url2);
+ static bool IsSameWebSite(Profile* profile,
+ const GURL& url1, const GURL& url2);
protected:
friend class base::RefCounted<SiteInstance>;
@@ -140,6 +141,12 @@ class SiteInstance : public base::RefCounted<SiteInstance>,
// GetRelatedSiteInstance instead.
explicit SiteInstance(BrowsingInstance* browsing_instance);
+ // Get the effective URL for the given actual URL. If the URL is part of an
+ // installed app, the effective URL is an extension URL with the ID of that
+ // extension as the host. This has the effect of grouping apps together in
+ // a common SiteInstance.
+ static GURL GetEffectiveURL(Profile* profile, const GURL& url);
+
// Returns the type of renderer process this instance belongs in, for grouping
// purposes.
RenderProcessHost::Type GetRendererType();