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

Side by Side Diff: chrome/browser/site_details.h

Issue 1453193004: Add histogram for number of out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the macro and use the predicates. Created 5 years, 1 month 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 27 matching lines...) Expand all
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 std::vector<content::SiteInstance*> instances;
48
49 // A set of all RenderFrameHosts, which are in a different SiteInstance from
50 // their parents.
51 std::set<content::RenderFrameHost*> out_of_process_frames;
48 }; 52 };
49 53
50 // Maps a BrowserContext to information about the sites it contains. 54 // Maps a BrowserContext to information about the sites it contains.
51 typedef base::hash_map<content::BrowserContext*, SiteData> 55 typedef base::hash_map<content::BrowserContext*, SiteData>
52 BrowserContextSiteDataMap; 56 BrowserContextSiteDataMap;
53 57
54 class SiteDetails { 58 class SiteDetails {
55 public: 59 public:
56 // Collect information about all committed sites in the given WebContents 60 // Collect information about all committed sites in the given WebContents
57 // on the UI thread. 61 // on the UI thread.
58 static void CollectSiteInfo(content::WebContents* contents, 62 static void CollectSiteInfo(content::WebContents* contents,
59 SiteData* site_data); 63 SiteData* site_data);
60 64
61 // Updates the global histograms for tracking memory usage. 65 // Updates the global histograms for tracking memory usage.
62 static void UpdateHistograms(const BrowserContextSiteDataMap& site_data_map, 66 static void UpdateHistograms(const BrowserContextSiteDataMap& site_data_map,
63 int all_renderer_process_count, 67 int all_renderer_process_count,
64 int non_renderer_process_count); 68 int non_renderer_process_count);
65 69
66 private: 70 private:
67 // Never needs to be constructed. 71 // Never needs to be constructed.
68 SiteDetails(); 72 SiteDetails();
69 ~SiteDetails(); 73 ~SiteDetails();
70 74
71 DISALLOW_COPY_AND_ASSIGN(SiteDetails); 75 DISALLOW_COPY_AND_ASSIGN(SiteDetails);
72 }; 76 };
73 77
74 #endif // CHROME_BROWSER_SITE_DETAILS_H_ 78 #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