| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <dirent.h> | 7 #include <dirent.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 { "firefox-bin", FIREFOX }, | 60 { "firefox-bin", FIREFOX }, |
| 61 { "iceweasel", ICEWEASEL }, | 61 { "iceweasel", ICEWEASEL }, |
| 62 { "opera", OPERA }, | 62 { "opera", OPERA }, |
| 63 { "konqueror", KONQUEROR }, | 63 { "konqueror", KONQUEROR }, |
| 64 { "epiphany-browse", EPIPHANY }, | 64 { "epiphany-browse", EPIPHANY }, |
| 65 { "epiphany", EPIPHANY }, | 65 { "epiphany", EPIPHANY }, |
| 66 { "midori", MIDORI }, | 66 { "midori", MIDORI }, |
| 67 { "", MAX_BROWSERS }, | 67 { "", MAX_BROWSERS }, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 MemoryDetails::MemoryDetails() { | 70 MemoryDetails::MemoryDetails() |
| 71 : user_metrics_mode_(UPDATE_USER_METRICS) { |
| 71 } | 72 } |
| 72 | 73 |
| 73 ProcessData* MemoryDetails::ChromeBrowser() { | 74 ProcessData* MemoryDetails::ChromeBrowser() { |
| 74 return &process_data_[0]; | 75 return &process_data_[0]; |
| 75 } | 76 } |
| 76 | 77 |
| 77 struct Process { | 78 struct Process { |
| 78 pid_t pid; | 79 pid_t pid; |
| 79 pid_t parent; | 80 pid_t parent; |
| 80 std::string name; | 81 std::string name; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 283 } |
| 283 | 284 |
| 284 process_data_.push_back(browser); | 285 process_data_.push_back(browser); |
| 285 } | 286 } |
| 286 | 287 |
| 287 // Finally return to the browser thread. | 288 // Finally return to the browser thread. |
| 288 BrowserThread::PostTask( | 289 BrowserThread::PostTask( |
| 289 BrowserThread::UI, FROM_HERE, | 290 BrowserThread::UI, FROM_HERE, |
| 290 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 291 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
| 291 } | 292 } |
| OLD | NEW |