Index: content/browser/site_instance.cc |
diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc |
index 442c80796b15da971ff3b006f78af1f65894cad8..a647f72d71f96b1caa6d97ceb8107691c7a0fba5 100644 |
--- a/content/browser/site_instance.cc |
+++ b/content/browser/site_instance.cc |
@@ -71,15 +71,15 @@ RenderProcessHost* SiteInstance::GetProcess() { |
// See if we should reuse an old process |
if (RenderProcessHost::ShouldTryToUseExistingProcessHost()) |
process_ = RenderProcessHost::GetExistingProcessHost( |
- browsing_instance_->profile(), GetRendererType()); |
+ browsing_instance_->context(), GetRendererType()); |
// Otherwise (or if that fails), create a new one. |
if (!process_) { |
if (render_process_host_factory_) { |
process_ = render_process_host_factory_->CreateRenderProcessHost( |
- browsing_instance_->profile()); |
+ browsing_instance_->context()); |
} else { |
- process_ = new BrowserRenderProcessHost(browsing_instance_->profile()); |
+ process_ = new BrowserRenderProcessHost(browsing_instance_->context()); |
} |
} |
@@ -102,7 +102,7 @@ void SiteInstance::SetSite(const GURL& url) { |
// Remember that this SiteInstance has been used to load a URL, even if the |
// URL is invalid. |
has_site_ = true; |
- site_ = GetSiteForURL(browsing_instance_->profile(), url); |
+ site_ = GetSiteForURL(browsing_instance_->context(), url); |
// Now that we have a site, register it with the BrowsingInstance. This |
// ensures that we won't create another SiteInstance for this site within |
@@ -126,28 +126,30 @@ bool SiteInstance::HasWrongProcessForURL(const GURL& url) const { |
// 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); |
+ GURL effective_url = GetEffectiveURL(browsing_instance_->context(), url); |
return effective_url.SchemeIs(chrome::kExtensionScheme) != |
process_->is_extension_process(); |
} |
/*static*/ |
-SiteInstance* SiteInstance::CreateSiteInstance(Profile* profile) { |
- return new SiteInstance(new BrowsingInstance(profile)); |
+SiteInstance* SiteInstance::CreateSiteInstance( |
+ content::BrowserContext* context) { |
+ return new SiteInstance(new BrowsingInstance(context)); |
} |
/*static*/ |
-SiteInstance* SiteInstance::CreateSiteInstanceForURL(Profile* profile, |
- const GURL& url) { |
+SiteInstance* SiteInstance::CreateSiteInstanceForURL( |
+ content::BrowserContext* context, const GURL& url) { |
// This BrowsingInstance may be deleted if it returns an existing |
// SiteInstance. |
- scoped_refptr<BrowsingInstance> instance(new BrowsingInstance(profile)); |
+ scoped_refptr<BrowsingInstance> instance(new BrowsingInstance(context)); |
return instance->GetSiteInstanceForURL(url); |
} |
/*static*/ |
-GURL SiteInstance::GetSiteForURL(Profile* profile, const GURL& real_url) { |
- GURL url = GetEffectiveURL(profile, real_url); |
+GURL SiteInstance::GetSiteForURL(content::BrowserContext* context, |
+ const GURL& real_url) { |
+ GURL url = GetEffectiveURL(context, real_url); |
// URLs with no host should have an empty site. |
GURL site; |
@@ -181,10 +183,10 @@ GURL SiteInstance::GetSiteForURL(Profile* profile, const GURL& real_url) { |
} |
/*static*/ |
-bool SiteInstance::IsSameWebSite(Profile* profile, |
+bool SiteInstance::IsSameWebSite(content::BrowserContext* context, |
const GURL& real_url1, const GURL& real_url2) { |
- GURL url1 = GetEffectiveURL(profile, real_url1); |
- GURL url2 = GetEffectiveURL(profile, real_url2); |
+ GURL url1 = GetEffectiveURL(context, real_url1); |
+ GURL url2 = GetEffectiveURL(context, real_url2); |
// We infer web site boundaries based on the registered domain name of the |
// top-level page and the scheme. We do not pay attention to the port if |
@@ -209,8 +211,9 @@ bool SiteInstance::IsSameWebSite(Profile* profile, |
} |
/*static*/ |
-GURL SiteInstance::GetEffectiveURL(Profile* profile, const GURL& url) { |
- return content::GetContentClient()->browser()->GetEffectiveURL(profile, url); |
+GURL SiteInstance::GetEffectiveURL(content::BrowserContext* context, |
+ const GURL& url) { |
+ return content::GetContentClient()->browser()->GetEffectiveURL(context, url); |
} |
/*static*/ |