summaryrefslogtreecommitdiffstats
path: root/content/browser/site_instance.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 17:47:37 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 17:47:37 +0000
commit3d7474fffebf62e0bbd2fe3f03996af3f28b8180 (patch)
tree9cdd26d0eb2c245da54447262e043fc620fdaaf6 /content/browser/site_instance.h
parent291fb3ed59e445c03756fa678c0935fc7140cdcf (diff)
downloadchromium_src-3d7474fffebf62e0bbd2fe3f03996af3f28b8180.zip
chromium_src-3d7474fffebf62e0bbd2fe3f03996af3f28b8180.tar.gz
chromium_src-3d7474fffebf62e0bbd2fe3f03996af3f28b8180.tar.bz2
Removal of Profile from content part 1.
BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7464009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/site_instance.h')
-rw-r--r--content/browser/site_instance.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/content/browser/site_instance.h b/content/browser/site_instance.h
index 4d3692c..84a0bdc 100644
--- a/content/browser/site_instance.h
+++ b/content/browser/site_instance.h
@@ -13,6 +13,10 @@
class BrowsingInstance;
+namespace content {
+class BrowserContext;
+}
+
///////////////////////////////////////////////////////////////////////////////
//
// SiteInstance class
@@ -36,8 +40,8 @@ class BrowsingInstance;
// SiteInstance is used.
//
// In --process-per-site, we consolidate all SiteInstances for a given site,
-// throughout the entire profile. This ensures that only one process will be
-// dedicated to each site.
+// throughout the entire browser context. This ensures that only one process
+// will be dedicated to each site.
//
// Each NavigationEntry for a TabContents points to the SiteInstance that
// rendered it. Each RenderViewHost also points to the SiteInstance that it is
@@ -119,18 +123,19 @@ class SiteInstance : public base::RefCounted<SiteInstance>,
//
// TODO(creis): This may be an argument to build a pass_refptr<T> class, as
// Darin suggests.
- static SiteInstance* CreateSiteInstance(Profile* profile);
+ static SiteInstance* CreateSiteInstance(
+ content::BrowserContext* browser_context);
// Factory method to get the appropriate SiteInstance for the given URL, in
// a new BrowsingInstance. Use this instead of CreateSiteInstance when you
// know the URL, since it allows special site grouping rules to be applied
// (for example, to group chrome-ui pages into the same instance).
- static SiteInstance* CreateSiteInstanceForURL(Profile* profile,
- const GURL& url);
+ static SiteInstance* CreateSiteInstanceForURL(
+ content::BrowserContext* browser_context, const GURL& url);
// 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(Profile* profile, const GURL& url);
+ static GURL GetSiteForURL(content::BrowserContext* context, 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
@@ -139,7 +144,7 @@ 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(Profile* profile,
+ static bool IsSameWebSite(content::BrowserContext* browser_context,
const GURL& url1, const GURL& url2);
// Returns the renderer type for this URL.
@@ -158,7 +163,8 @@ class SiteInstance : public base::RefCounted<SiteInstance>,
explicit SiteInstance(BrowsingInstance* browsing_instance);
// Get the effective URL for the given actual URL.
- static GURL GetEffectiveURL(Profile* profile, const GURL& url);
+ static GURL GetEffectiveURL(content::BrowserContext* browser_context,
+ const GURL& url);
// Returns the type of renderer process this instance belongs in, for grouping
// purposes.