diff options
Diffstat (limited to 'chrome/browser/browsing_instance.h')
-rw-r--r-- | chrome/browser/browsing_instance.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/browsing_instance.h b/chrome/browser/browsing_instance.h index c067a0d..9310b6a 100644 --- a/chrome/browser/browsing_instance.h +++ b/chrome/browser/browsing_instance.h @@ -59,13 +59,6 @@ class BrowsingInstance : public base::RefCounted<BrowsingInstance> { : profile_(profile) { } - // Virtual to allow tests to extend it. - virtual ~BrowsingInstance() { - // We should only be deleted when all of the SiteInstances that refer to - // us are gone. - DCHECK(site_instance_map_.empty()); - } - // Returns whether the process-per-site model is in use (globally or just for // the given url), in which case we should ensure there is only one // SiteInstance per site for the entire profile, not just for this @@ -94,6 +87,16 @@ class BrowsingInstance : public base::RefCounted<BrowsingInstance> { // BrowsingInstance. void UnregisterSiteInstance(SiteInstance* site_instance); + protected: + friend class base::RefCounted<BrowsingInstance>; + + // Virtual to allow tests to extend it. + virtual ~BrowsingInstance() { + // We should only be deleted when all of the SiteInstances that refer to + // us are gone. + DCHECK(site_instance_map_.empty()); + } + private: // Map of site to SiteInstance, to ensure we only have one SiteInstance per // site. The site string should be the possibly_invalid_spec() of a GURL |