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

Unified Diff: chrome/browser/site_details.h

Issue 1492033002: Add UMA histogram for the number of SiteInstances per BrowsingInstance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Scott's review. Created 5 years 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 | « no previous file | chrome/browser/site_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/site_details.h
diff --git a/chrome/browser/site_details.h b/chrome/browser/site_details.h
index a81fc379ea059aac5b0df18eff577a46d33ab613..555e8918cfa6c6ea0d1b1eba3abefe378cfe19e1 100644
--- a/chrome/browser/site_details.h
+++ b/chrome/browser/site_details.h
@@ -11,7 +11,12 @@
#include "content/public/browser/web_contents.h"
// Maps an ID representing each BrowsingInstance to a set of site URLs.
-typedef base::hash_map<int32, std::set<GURL>> BrowsingInstanceSiteMap;
+using BrowsingInstanceSiteMap = base::hash_map<int32, std::set<GURL>>;
+
+// Maps a SiteInstance to a set of all SiteInstances in the same
+// BrowsingInstance.
+using SiteInstanceMap =
+ base::hash_map<content::SiteInstance*, std::set<content::SiteInstance*>>;
// This enum represents various alternative process model policies that we want
// to evaluate. We'll estimate the process cost of each scenario.
@@ -44,7 +49,9 @@ struct SiteData {
IsolationScenario scenarios[ISOLATION_SCENARIO_LAST + 1];
// Global list of all SiteInstances, used for de-duping related instances.
- std::vector<content::SiteInstance*> instances;
+ // It also keeps a set of all SiteInstances in the BrowsingInstance identified
+ // by the SiteInstance used as the key.
+ SiteInstanceMap instances;
// A count of all RenderFrameHosts, which are in a different SiteInstance from
// their parents.
« no previous file with comments | « no previous file | chrome/browser/site_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698