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 #include "chrome/browser/memory_details.h" | 5 #include "chrome/browser/memory_details.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "content/public/browser/zygote_host_linux.h" | 36 #include "content/public/browser/zygote_host_linux.h" |
37 #endif | 37 #endif |
38 | 38 |
39 using base::StringPrintf; | 39 using base::StringPrintf; |
40 using content::BrowserChildProcessHostIterator; | 40 using content::BrowserChildProcessHostIterator; |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 using content::NavigationEntry; | 42 using content::NavigationEntry; |
43 using content::RenderViewHost; | 43 using content::RenderViewHost; |
44 using content::RenderWidgetHost; | 44 using content::RenderWidgetHost; |
45 using content::WebContents; | 45 using content::WebContents; |
| 46 using extensions::Extension; |
46 | 47 |
47 // static | 48 // static |
48 std::string ProcessMemoryInformation::GetRendererTypeNameInEnglish( | 49 std::string ProcessMemoryInformation::GetRendererTypeNameInEnglish( |
49 RendererProcessType type) { | 50 RendererProcessType type) { |
50 switch (type) { | 51 switch (type) { |
51 case RENDERER_NORMAL: | 52 case RENDERER_NORMAL: |
52 return "Tab"; | 53 return "Tab"; |
53 case RENDERER_CHROME: | 54 case RENDERER_CHROME: |
54 return "Tab (Chrome)"; | 55 return "Tab (Chrome)"; |
55 case RENDERER_EXTENSION: | 56 case RENDERER_EXTENSION: |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", | 465 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", |
465 pepper_plugin_count); | 466 pepper_plugin_count); |
466 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); | 467 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); |
467 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); | 468 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); |
468 // TODO(viettrungluu): Do we want separate counts for the other | 469 // TODO(viettrungluu): Do we want separate counts for the other |
469 // (platform-specific) process types? | 470 // (platform-specific) process types? |
470 | 471 |
471 int total_sample = static_cast<int>(aggregate_memory / 1000); | 472 int total_sample = static_cast<int>(aggregate_memory / 1000); |
472 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); | 473 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); |
473 } | 474 } |
OLD | NEW |