Chromium Code Reviews| Index: content/browser/site_instance_impl.cc |
| diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc |
| index 9f88bafc19e967fae60f63a46c3761e9d350cc67..89a8bef0cfd74d06212064ab7926d885ee9e55d9 100644 |
| --- a/content/browser/site_instance_impl.cc |
| +++ b/content/browser/site_instance_impl.cc |
| @@ -24,11 +24,7 @@ const RenderProcessHostFactory* |
| int32_t SiteInstanceImpl::next_site_instance_id_ = 1; |
| SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance) |
| - : id_(next_site_instance_id_++), |
| - active_frame_count_(0), |
| - browsing_instance_(browsing_instance), |
| - process_(NULL), |
| - has_site_(false) { |
| + : id_(next_site_instance_id_++), browsing_instance_(browsing_instance) { |
| DCHECK(browsing_instance); |
| } |
| @@ -211,11 +207,24 @@ bool SiteInstanceImpl::HasWrongProcessForURL(const GURL& url) { |
| GetProcess(), browsing_instance_->browser_context(), site_url); |
| } |
| +SiteInstance* SiteInstanceImpl::GetRelatedSiteInstanceForThirdPartySubframes( |
| + const GURL& url) { |
| + return browsing_instance_->GetSiteInstanceForThirdPartySubframes(url); |
| +} |
| + |
| bool SiteInstanceImpl::RequiresDedicatedProcess() { |
| if (!has_site_) |
| return false; |
| - return SiteInstanceImpl::DoesSiteRequireDedicatedProcess(GetBrowserContext(), |
| - site_); |
| + |
| + if (DoesSiteRequireDedicatedProcess(GetBrowserContext(), site_)) |
| + return true; |
| + |
| + if (!is_for_third_party_subframes() && |
| + SiteIsolationPolicy::UseDedicatedProcessForTopDocument()) { |
|
Charlie Reis
2016/03/18 21:15:13
Might not need this.
|
| + return true; |
| + } |
| + |
| + return false; |
| } |
| void SiteInstanceImpl::IncrementActiveFrameCount() { |
| @@ -379,7 +388,7 @@ bool SiteInstanceImpl::DoesSiteRequireDedicatedProcess( |
| void SiteInstanceImpl::RenderProcessHostDestroyed(RenderProcessHost* host) { |
| DCHECK_EQ(process_, host); |
| process_->RemoveObserver(this); |
| - process_ = NULL; |
| + process_ = nullptr; |
| } |
| void SiteInstanceImpl::RenderProcessWillExit(RenderProcessHost* host) { |