| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |