OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/chrome_process_util.h" | 5 #include "chrome/test/chrome_process_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 size_t ChromeTestProcessMetrics::GetPagefileUsage() { | 97 size_t ChromeTestProcessMetrics::GetPagefileUsage() { |
98 return process_metrics_->GetPagefileUsage(); | 98 return process_metrics_->GetPagefileUsage(); |
99 } | 99 } |
100 | 100 |
101 size_t ChromeTestProcessMetrics::GetWorkingSetSize() { | 101 size_t ChromeTestProcessMetrics::GetWorkingSetSize() { |
102 return process_metrics_->GetWorkingSetSize(); | 102 return process_metrics_->GetWorkingSetSize(); |
103 } | 103 } |
104 | 104 |
105 #endif // !defined(OS_MACOSX) | 105 #endif // !defined(OS_MACOSX) |
| 106 |
| 107 ChromeTestProcessMetrics::~ChromeTestProcessMetrics() {} |
| 108 |
| 109 ChromeTestProcessMetrics::ChromeTestProcessMetrics( |
| 110 base::ProcessHandle process) { |
| 111 #if !defined(OS_MACOSX) |
| 112 process_metrics_.reset( |
| 113 base::ProcessMetrics::CreateProcessMetrics(process)); |
| 114 #else |
| 115 process_metrics_.reset( |
| 116 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); |
| 117 #endif |
| 118 process_handle_ = process; |
| 119 } |
| 120 |
OLD | NEW |