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

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

Issue 1406133002: Several Site Details / Memory metrics fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_isolate_apps4
Patch Set: thestig's fixes. 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 | « chrome/browser/memory_details.cc ('k') | chrome/browser/site_details.cc » ('j') | no next file with comments »
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"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 12
13 // Maps an ID representing each BrowsingInstance to a set of site URLs. 13 // Maps an ID representing each BrowsingInstance to a set of site URLs.
14 typedef base::hash_map<int32, std::set<GURL>> BrowsingInstanceSiteMap; 14 typedef base::hash_map<int32, std::set<GURL>> BrowsingInstanceSiteMap;
15 15
16 // This enum represents various alternative process model policies that we want 16 // This enum represents various alternative process model policies that we want
17 // to evaluate. We'll estimate the process cost of each scenario. 17 // to evaluate. We'll estimate the process cost of each scenario.
18 enum IsolationScenarioType { 18 enum IsolationScenarioType {
19 ISOLATE_NOTHING,
19 ISOLATE_ALL_SITES, 20 ISOLATE_ALL_SITES,
20 ISOLATE_HTTPS_SITES, 21 ISOLATE_HTTPS_SITES,
21 ISOLATE_EXTENSIONS, 22 ISOLATE_EXTENSIONS,
22 ISOLATION_SCENARIO_LAST = ISOLATE_EXTENSIONS 23 ISOLATION_SCENARIO_LAST = ISOLATE_EXTENSIONS
23 }; 24 };
24 25
25 // Contains the state required to estimate the process count under a particular 26 // Contains the state required to estimate the process count under a particular
26 // process model. We have one of these per IsolationScenarioType. 27 // process model. We have one of these per IsolationScenarioType.
27 struct IsolationScenario { 28 struct IsolationScenario {
28 IsolationScenario(); 29 IsolationScenario();
29 ~IsolationScenario(); 30 ~IsolationScenario();
30 31
31 void CollectSiteInfoForScenario(content::SiteInstance* primary,
32 const GURL& site);
33 void GetProcessCountEstimate();
34 void GetProcessCountLowerBound();
35
36 IsolationScenarioType policy; 32 IsolationScenarioType policy;
37 std::set<GURL> sites; 33 std::set<GURL> sites;
38 BrowsingInstanceSiteMap browsing_instance_site_map; 34 BrowsingInstanceSiteMap browsing_instance_site_map;
39 }; 35 };
40 36
41 // Information about the sites and SiteInstances in each BrowsingInstance, for 37 // Information about the sites and SiteInstances in each BrowsingInstance, for
42 // 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.
43 struct SiteData { 39 struct SiteData {
44 SiteData(); 40 SiteData();
45 ~SiteData(); 41 ~SiteData();
(...skipping 23 matching lines...) Expand all
69 65
70 private: 66 private:
71 // Never needs to be constructed. 67 // Never needs to be constructed.
72 SiteDetails(); 68 SiteDetails();
73 ~SiteDetails(); 69 ~SiteDetails();
74 70
75 DISALLOW_COPY_AND_ASSIGN(SiteDetails); 71 DISALLOW_COPY_AND_ASSIGN(SiteDetails);
76 }; 72 };
77 73
78 #endif // CHROME_BROWSER_SITE_DETAILS_H_ 74 #endif // CHROME_BROWSER_SITE_DETAILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/site_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698