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 <sys/types.h> | 7 #include <sys/types.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 "Firefox", | 45 "Firefox", |
46 "Iceweasel", | 46 "Iceweasel", |
47 "Opera", | 47 "Opera", |
48 "Konqueror", | 48 "Konqueror", |
49 "Epiphany", | 49 "Epiphany", |
50 "Midori", | 50 "Midori", |
51 }; | 51 }; |
52 | 52 |
53 // A mapping from process name to the type of browser. | 53 // A mapping from process name to the type of browser. |
54 static const struct { | 54 static const struct { |
55 const char process_name[16]; | 55 const char process_name[17]; |
56 BrowserType browser; | 56 BrowserType browser; |
57 } kBrowserBinaryNames[] = { | 57 } kBrowserBinaryNames[] = { |
58 { "firefox", FIREFOX }, | 58 { "firefox", FIREFOX }, |
59 { "firefox-3.5", FIREFOX }, | 59 { "firefox-3.5", FIREFOX }, |
60 { "firefox-3.0", FIREFOX }, | 60 { "firefox-3.0", FIREFOX }, |
61 { "firefox-bin", FIREFOX }, | 61 { "firefox-bin", FIREFOX }, |
62 { "iceweasel", ICEWEASEL }, | 62 { "iceweasel", ICEWEASEL }, |
63 { "opera", OPERA }, | 63 { "opera", OPERA }, |
64 { "konqueror", KONQUEROR }, | 64 { "konqueror", KONQUEROR }, |
65 { "epiphany-browse", EPIPHANY }, | 65 { "epiphany-browser", EPIPHANY }, |
66 { "epiphany", EPIPHANY }, | 66 { "epiphany", EPIPHANY }, |
67 { "midori", MIDORI }, | 67 { "midori", MIDORI }, |
68 { "", MAX_BROWSERS }, | 68 { "", MAX_BROWSERS }, |
69 }; | 69 }; |
70 | 70 |
71 MemoryDetails::MemoryDetails() | 71 MemoryDetails::MemoryDetails() |
72 : user_metrics_mode_(UPDATE_USER_METRICS), | 72 : user_metrics_mode_(UPDATE_USER_METRICS), |
73 memory_growth_tracker_(NULL) { | 73 memory_growth_tracker_(NULL) { |
74 } | 74 } |
75 | 75 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 #if defined(OS_CHROMEOS) | 237 #if defined(OS_CHROMEOS) |
238 base::GetSwapInfo(&swap_info_); | 238 base::GetSwapInfo(&swap_info_); |
239 #endif | 239 #endif |
240 | 240 |
241 // Finally return to the browser thread. | 241 // Finally return to the browser thread. |
242 BrowserThread::PostTask( | 242 BrowserThread::PostTask( |
243 BrowserThread::UI, FROM_HERE, | 243 BrowserThread::UI, FROM_HERE, |
244 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 244 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
245 } | 245 } |
OLD | NEW |