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/process_metrics.h" | 11 #include "base/process/process_metrics.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "chrome/browser/site_details.h" | 13 #include "chrome/browser/site_details.h" |
14 #include "content/public/common/process_type.h" | 14 #include "content/public/common/process_type.h" |
15 | 15 |
16 // We collect data about each browser process. A browser may | 16 // We collect data about each browser process. A browser may |
17 // have multiple processes (of course!). Even IE has multiple | 17 // have multiple processes (of course!). Even IE has multiple |
18 // processes these days. | 18 // processes these days. |
19 struct ProcessMemoryInformation { | 19 struct ProcessMemoryInformation { |
20 // 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 |
21 // 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. |
22 enum RendererProcessType { | 22 enum RendererProcessType { |
23 RENDERER_UNKNOWN = 0, | 23 RENDERER_UNKNOWN = 0, |
24 RENDERER_NORMAL, | 24 RENDERER_NORMAL, |
25 RENDERER_CHROME, // WebUI (chrome:// URL) | 25 RENDERER_CHROME, // WebUI (chrome:// URL) |
26 RENDERER_EXTENSION, // chrome-extension:// | 26 RENDERER_EXTENSION, // chrome-extension:// |
27 RENDERER_DEVTOOLS, // Web inspector | 27 RENDERER_DEVTOOLS, // Web inspector |
28 RENDERER_INTERSTITIAL, // malware/phishing interstitial | 28 RENDERER_INTERSTITIAL, // malware/phishing interstitial |
29 RENDERER_NOTIFICATION, // HTML notification bubble | |
30 RENDERER_BACKGROUND_APP // hosted app background page | 29 RENDERER_BACKGROUND_APP // hosted app background page |
31 }; | 30 }; |
32 | 31 |
33 static std::string GetRendererTypeNameInEnglish(RendererProcessType type); | 32 static std::string GetRendererTypeNameInEnglish(RendererProcessType type); |
34 static std::string GetFullTypeNameInEnglish( | 33 static std::string GetFullTypeNameInEnglish( |
35 int process_type, | 34 int process_type, |
36 RendererProcessType rtype); | 35 RendererProcessType rtype); |
37 | 36 |
38 ProcessMemoryInformation(); | 37 ProcessMemoryInformation(); |
39 ~ProcessMemoryInformation(); | 38 ~ProcessMemoryInformation(); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 UserMetricsMode user_metrics_mode_; | 187 UserMetricsMode user_metrics_mode_; |
189 | 188 |
190 #if defined(OS_CHROMEOS) | 189 #if defined(OS_CHROMEOS) |
191 base::SwapInfo swap_info_; | 190 base::SwapInfo swap_info_; |
192 #endif | 191 #endif |
193 | 192 |
194 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); | 193 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); |
195 }; | 194 }; |
196 | 195 |
197 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ | 196 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ |
OLD | NEW |