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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 info.titles = child.titles; | 55 info.titles = child.titles; |
56 info.process_type = child.process_type; | 56 info.process_type = child.process_type; |
57 break; | 57 break; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 std::unique_ptr<base::ProcessMetrics> metrics = | 61 std::unique_ptr<base::ProcessMetrics> metrics = |
62 base::ProcessMetrics::CreateProcessMetrics( | 62 base::ProcessMetrics::CreateProcessMetrics( |
63 pid, content::BrowserChildProcessHost::GetPortProvider()); | 63 pid, content::BrowserChildProcessHost::GetPortProvider()); |
64 metrics->GetCommittedAndWorkingSetKBytes(&info.committed, &info.working_set); | 64 metrics->GetCommittedAndWorkingSetKBytes(&info.committed, &info.working_set); |
65 info.phys_footprint = metrics->GetPhysicalFootprint(); | 65 info.phys_footprint = metrics->GetTaskVMInfo().phys_footprint; |
66 | 66 |
67 processes->push_back(info); | 67 processes->push_back(info); |
68 } | 68 } |
69 | 69 |
70 } // namespace | 70 } // namespace |
71 | 71 |
72 MemoryDetails::MemoryDetails() { | 72 MemoryDetails::MemoryDetails() { |
73 const base::FilePath browser_process_path = | 73 const base::FilePath browser_process_path = |
74 base::GetProcessExecutablePath(base::GetCurrentProcessHandle()); | 74 base::GetProcessExecutablePath(base::GetCurrentProcessHandle()); |
75 | 75 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Collect data about Chrome/Chromium. | 126 // Collect data about Chrome/Chromium. |
127 for (const base::ProcessId& pid : all_pids) | 127 for (const base::ProcessId& pid : all_pids) |
128 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes); | 128 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes); |
129 | 129 |
130 // Finally return to the browser thread. | 130 // Finally return to the browser thread. |
131 BrowserThread::PostTask( | 131 BrowserThread::PostTask( |
132 BrowserThread::UI, FROM_HERE, | 132 BrowserThread::UI, FROM_HERE, |
133 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 133 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
134 } | 134 } |
OLD | NEW |