Index: chrome/browser/browsing_instance.cc |
diff --git a/chrome/browser/browsing_instance.cc b/chrome/browser/browsing_instance.cc |
index 41a3abc4196dab9d3793bbea91c78bdabecf9825..ec433b78e9e610bbee3aaa3918ab04c3c6569b62 100644 |
--- a/chrome/browser/browsing_instance.cc |
+++ b/chrome/browser/browsing_instance.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/browser/browsing_instance.h" |
#include "base/command_line.h" |
+#include "base/logging.h" |
#include "chrome/browser/profile.h" |
#include "chrome/browser/renderer_host/site_instance.h" |
#include "chrome/common/chrome_switches.h" |
@@ -14,6 +15,10 @@ |
BrowsingInstance::ProfileSiteInstanceMap |
BrowsingInstance::profile_site_instance_map_; |
+BrowsingInstance::BrowsingInstance(Profile* profile) |
+ : profile_(profile) { |
+} |
+ |
bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) { |
// Returns true if we should use the process-per-site model. This will be |
// the case if the --process-per-site switch is specified, or in |
@@ -123,3 +128,9 @@ void BrowsingInstance::UnregisterSiteInstance(SiteInstance* site_instance) { |
map->erase(i); |
} |
} |
+ |
+BrowsingInstance::~BrowsingInstance() { |
+ // We should only be deleted when all of the SiteInstances that refer to |
+ // us are gone. |
+ DCHECK(site_instance_map_.empty()); |
+} |