| Index: chrome/browser/memory_details.h
|
| diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h
|
| index 66094f2563a3f4a6384aa291f1d6d53dddd118fa..ce6e83f184a10563e0d204cc89e79ca9c849452f 100644
|
| --- a/chrome/browser/memory_details.h
|
| +++ b/chrome/browser/memory_details.h
|
| @@ -7,9 +7,13 @@
|
|
|
| #include <vector>
|
|
|
| +#include "base/hash_tables.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/process_util.h"
|
| #include "base/strings/string16.h"
|
| +#include "content/public/browser/browser_context.h"
|
| +#include "content/public/browser/site_instance.h"
|
| +#include "content/public/browser/web_contents.h"
|
| #include "content/public/common/process_type.h"
|
|
|
| // We collect data about each browser process. A browser may
|
| @@ -66,6 +70,26 @@ struct ProcessMemoryInformation {
|
|
|
| typedef std::vector<ProcessMemoryInformation> ProcessMemoryInformationList;
|
|
|
| +// Maps an ID representing each BrowsingInstance to a set of site URLs.
|
| +typedef base::hash_map<int32, std::set<GURL> > BrowsingInstanceSiteMap;
|
| +
|
| +// Information about the sites and SiteInstances in each BrowsingInstance, for
|
| +// use in estimating the number of processes needed for various process models.
|
| +struct SiteData {
|
| + SiteData();
|
| + ~SiteData();
|
| +
|
| + std::set<GURL> sites;
|
| + std::set<GURL> https_sites;
|
| + std::vector<content::SiteInstance*> instances;
|
| + BrowsingInstanceSiteMap instance_site_map;
|
| + BrowsingInstanceSiteMap instance_https_site_map;
|
| +};
|
| +
|
| +// Maps a BrowserContext to information about the SiteInstances it contains.
|
| +typedef base::hash_map<content::BrowserContext*, SiteData>
|
| + BrowserContextSiteDataMap;
|
| +
|
| // Browser Process Information.
|
| struct ProcessData {
|
| ProcessData();
|
| @@ -76,6 +100,8 @@ struct ProcessData {
|
| string16 name;
|
| string16 process_name;
|
| ProcessMemoryInformationList processes;
|
| +
|
| + BrowserContextSiteDataMap site_data;
|
| };
|
|
|
| #if defined(OS_MACOSX)
|
| @@ -168,6 +194,9 @@ class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> {
|
| // renderer processes is only available there.
|
| void CollectChildInfoOnUIThread();
|
|
|
| + // Collect information about all committed sites in the given WebContents.
|
| + void CollectSiteInfo(content::WebContents* contents);
|
| +
|
| // Updates the global histograms for tracking memory usage.
|
| void UpdateHistograms();
|
|
|
|
|