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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/site_details.cc » ('j') | chrome/browser/site_details.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SITE_DETAILS_H_ 5 #ifndef CHROME_BROWSER_SITE_DETAILS_H_
6 #define CHROME_BROWSER_SITE_DETAILS_H_ 6 #define CHROME_BROWSER_SITE_DETAILS_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/site_instance.h" 10 #include "content/public/browser/site_instance.h"
(...skipping 26 matching lines...) Expand all
37 // Information about the sites and SiteInstances in each BrowsingInstance, for 37 // Information about the sites and SiteInstances in each BrowsingInstance, for
38 // use in estimating the number of processes needed for various process models. 38 // use in estimating the number of processes needed for various process models.
39 struct SiteData { 39 struct SiteData {
40 SiteData(); 40 SiteData();
41 ~SiteData(); 41 ~SiteData();
42 42
43 // One IsolationScenario object per IsolationScenarioType. 43 // One IsolationScenario object per IsolationScenarioType.
44 IsolationScenario scenarios[ISOLATION_SCENARIO_LAST + 1]; 44 IsolationScenario scenarios[ISOLATION_SCENARIO_LAST + 1];
45 45
46 // Global list of all SiteInstances, used for de-duping related instances. 46 // Global list of all SiteInstances, used for de-duping related instances.
47 std::vector<content::SiteInstance*> instances; 47 // It also keeps a set of all SiteInstances in the BrowsingInstance identified
48 // by the SiteInstance used as the key.
49 base::hash_map<content::SiteInstance*, std::set<content::SiteInstance*>>
50 instances;
48 51
49 // A count of all RenderFrameHosts, which are in a different SiteInstance from 52 // A count of all RenderFrameHosts, which are in a different SiteInstance from
50 // their parents. 53 // their parents.
51 int out_of_process_frames; 54 int out_of_process_frames;
52 }; 55 };
53 56
54 // Maps a BrowserContext to information about the sites it contains. 57 // Maps a BrowserContext to information about the sites it contains.
55 typedef base::hash_map<content::BrowserContext*, SiteData> 58 typedef base::hash_map<content::BrowserContext*, SiteData>
56 BrowserContextSiteDataMap; 59 BrowserContextSiteDataMap;
57 60
(...skipping 11 matching lines...) Expand all
69 72
70 private: 73 private:
71 // Never needs to be constructed. 74 // Never needs to be constructed.
72 SiteDetails(); 75 SiteDetails();
73 ~SiteDetails(); 76 ~SiteDetails();
74 77
75 DISALLOW_COPY_AND_ASSIGN(SiteDetails); 78 DISALLOW_COPY_AND_ASSIGN(SiteDetails);
76 }; 79 };
77 80
78 #endif // CHROME_BROWSER_SITE_DETAILS_H_ 81 #endif // CHROME_BROWSER_SITE_DETAILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/site_details.cc » ('j') | chrome/browser/site_details.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698