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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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-browse", 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), | |
73 memory_growth_tracker_(NULL) { | |
74 } | 72 } |
75 | 73 |
76 ProcessData* MemoryDetails::ChromeBrowser() { | 74 ProcessData* MemoryDetails::ChromeBrowser() { |
77 return &process_data_[0]; | 75 return &process_data_[0]; |
78 } | 76 } |
79 | 77 |
80 struct Process { | 78 struct Process { |
81 pid_t pid; | 79 pid_t pid; |
82 pid_t parent; | 80 pid_t parent; |
83 std::string name; | 81 std::string name; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 234 |
237 #if defined(OS_CHROMEOS) | 235 #if defined(OS_CHROMEOS) |
238 base::GetSwapInfo(&swap_info_); | 236 base::GetSwapInfo(&swap_info_); |
239 #endif | 237 #endif |
240 | 238 |
241 // Finally return to the browser thread. | 239 // Finally return to the browser thread. |
242 BrowserThread::PostTask( | 240 BrowserThread::PostTask( |
243 BrowserThread::UI, FROM_HERE, | 241 BrowserThread::UI, FROM_HERE, |
244 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 242 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
245 } | 243 } |
OLD | NEW |