Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: content/browser/site_instance_impl.cc

Issue 257083002: Check BrowsingInstance before swapping prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance_impl.cc
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 9bb1e755d8f79cba7ed92396667d27d60b33f799..b6e6918c0a48d755b0ae631270858c440afd3cb0 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -182,6 +182,10 @@ bool SiteInstanceImpl::IsRelatedSiteInstance(const SiteInstance* instance) {
instance)->browsing_instance_.get();
}
+size_t SiteInstanceImpl::GetRelatedActiveContentsCount() {
+ return browsing_instance_->active_contents_count();
+}
+
bool SiteInstanceImpl::HasWrongProcessForURL(const GURL& url) {
// Having no process isn't a problem, since we'll assign it correctly.
// Note that HasProcess() may return true if process_ is null, in
@@ -203,6 +207,14 @@ bool SiteInstanceImpl::HasWrongProcessForURL(const GURL& url) {
GetProcess(), browsing_instance_->browser_context(), site_url);
}
+void SiteInstanceImpl::IncrementRelatedActiveContentsCount() {
+ browsing_instance_->increment_active_contents_count();
+}
+
+void SiteInstanceImpl::DecrementRelatedActiveContentsCount() {
+ browsing_instance_->decrement_active_contents_count();
+}
+
void SiteInstanceImpl::set_render_process_host_factory(
const RenderProcessHostFactory* rph_factory) {
g_render_process_host_factory_ = rph_factory;
« no previous file with comments | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698