| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEMORY_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_DETAILS_H_ |
| 6 #define CHROME_BROWSER_MEMORY_DETAILS_H_ | 6 #define CHROME_BROWSER_MEMORY_DETAILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "chrome/browser/site_details.h" |
| 13 #include "content/public/common/process_type.h" | 14 #include "content/public/common/process_type.h" |
| 14 | 15 |
| 15 // We collect data about each browser process. A browser may | 16 // We collect data about each browser process. A browser may |
| 16 // have multiple processes (of course!). Even IE has multiple | 17 // have multiple processes (of course!). Even IE has multiple |
| 17 // processes these days. | 18 // processes these days. |
| 18 struct ProcessMemoryInformation { | 19 struct ProcessMemoryInformation { |
| 19 // NOTE: Do not remove or reorder the elements in this enum, and only add new | 20 // NOTE: Do not remove or reorder the elements in this enum, and only add new |
| 20 // items at the end. We depend on these specific values in a histogram. | 21 // items at the end. We depend on these specific values in a histogram. |
| 21 enum RendererProcessType { | 22 enum RendererProcessType { |
| 22 RENDERER_UNKNOWN = 0, | 23 RENDERER_UNKNOWN = 0, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Browser Process Information. | 70 // Browser Process Information. |
| 70 struct ProcessData { | 71 struct ProcessData { |
| 71 ProcessData(); | 72 ProcessData(); |
| 72 ProcessData(const ProcessData& rhs); | 73 ProcessData(const ProcessData& rhs); |
| 73 ~ProcessData(); | 74 ~ProcessData(); |
| 74 ProcessData& operator=(const ProcessData& rhs); | 75 ProcessData& operator=(const ProcessData& rhs); |
| 75 | 76 |
| 76 string16 name; | 77 string16 name; |
| 77 string16 process_name; | 78 string16 process_name; |
| 78 ProcessMemoryInformationList processes; | 79 ProcessMemoryInformationList processes; |
| 80 |
| 81 // Track site data for predicting process counts with out-of-process iframes. |
| 82 // See site_details.h. |
| 83 BrowserContextSiteDataMap site_data; |
| 79 }; | 84 }; |
| 80 | 85 |
| 81 #if defined(OS_MACOSX) | 86 #if defined(OS_MACOSX) |
| 82 class ProcessInfoSnapshot; | 87 class ProcessInfoSnapshot; |
| 83 #endif | 88 #endif |
| 84 | 89 |
| 85 // MemoryDetails fetches memory details about current running browsers. | 90 // MemoryDetails fetches memory details about current running browsers. |
| 86 // Because this data can only be fetched asynchronously, callers use | 91 // Because this data can only be fetched asynchronously, callers use |
| 87 // this class via a callback. | 92 // this class via a callback. |
| 88 // | 93 // |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 ProcessData* ChromeBrowser(); | 180 ProcessData* ChromeBrowser(); |
| 176 | 181 |
| 177 std::vector<ProcessData> process_data_; | 182 std::vector<ProcessData> process_data_; |
| 178 | 183 |
| 179 UserMetricsMode user_metrics_mode_; | 184 UserMetricsMode user_metrics_mode_; |
| 180 | 185 |
| 181 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); | 186 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); |
| 182 }; | 187 }; |
| 183 | 188 |
| 184 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ | 189 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ |
| OLD | NEW |