diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:56:19 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:56:19 +0000 |
commit | e6e6ba4925feed48fbbd0568b07d8ccb6569eeee (patch) | |
tree | fc2fc1bc4d4a56fb413709a977b6ba42ab27af46 /chrome/browser/browsing_instance.h | |
parent | daefca3e87d6d36f0e6a58e3b0ff60917f285acb (diff) | |
download | chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.zip chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.gz chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.bz2 |
Ninth patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/372013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31357 0039d316-1c4b-4281-b951-d872f2087c98
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 |