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

Unified Diff: chrome/browser/browsing_instance.cc

Issue 3461019: FBTF: Move virtual methods to implementation files. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win+chromeos+mac fixes Created 10 years, 3 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
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());
+}

Powered by Google App Engine
This is Rietveld 408576698