OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_TEST_CHROME_PROCESS_UTIL_H_ | 5 #ifndef CHROME_TEST_CHROME_PROCESS_UTIL_H_ |
6 #define CHROME_TEST_CHROME_PROCESS_UTIL_H_ | 6 #define CHROME_TEST_CHROME_PROCESS_UTIL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 bool GetIOCounters(IoCounters* io_counters) { | 52 bool GetIOCounters(IoCounters* io_counters) { |
53 return process_metrics_->GetIOCounters(io_counters); | 53 return process_metrics_->GetIOCounters(io_counters); |
54 } | 54 } |
55 | 55 |
56 base::ProcessHandle process_handle_; | 56 base::ProcessHandle process_handle_; |
57 | 57 |
58 private: | 58 private: |
59 explicit ChromeTestProcessMetrics(base::ProcessHandle process) { | 59 explicit ChromeTestProcessMetrics(base::ProcessHandle process) { |
60 process_metrics_.reset(base::ProcessMetrics::CreateProcessMetrics(process)); | 60 process_metrics_.reset( |
| 61 #if !defined(OS_MACOSX) |
| 62 base::ProcessMetrics::CreateProcessMetrics(process)); |
| 63 #else |
| 64 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); |
| 65 #endif |
61 process_handle_ = process; | 66 process_handle_ = process; |
62 } | 67 } |
63 | 68 |
64 scoped_ptr<base::ProcessMetrics> process_metrics_; | 69 scoped_ptr<base::ProcessMetrics> process_metrics_; |
65 | 70 |
66 DISALLOW_COPY_AND_ASSIGN(ChromeTestProcessMetrics); | 71 DISALLOW_COPY_AND_ASSIGN(ChromeTestProcessMetrics); |
67 }; | 72 }; |
68 | 73 |
69 #if defined(OS_MACOSX) | 74 #if defined(OS_MACOSX) |
70 | 75 |
(...skipping 14 matching lines...) Expand all Loading... |
85 | 90 |
86 typedef std::vector<MacChromeProcessInfo> MacChromeProcessInfoList; | 91 typedef std::vector<MacChromeProcessInfo> MacChromeProcessInfoList; |
87 | 92 |
88 // Any ProcessId that info can't be found for will be left out. | 93 // Any ProcessId that info can't be found for will be left out. |
89 MacChromeProcessInfoList GetRunningMacProcessInfo( | 94 MacChromeProcessInfoList GetRunningMacProcessInfo( |
90 const ChromeProcessList &process_list); | 95 const ChromeProcessList &process_list); |
91 | 96 |
92 #endif // defined(OS_MACOSX) | 97 #endif // defined(OS_MACOSX) |
93 | 98 |
94 #endif // CHROME_TEST_CHROME_PROCESS_UTIL_H_ | 99 #endif // CHROME_TEST_CHROME_PROCESS_UTIL_H_ |
OLD | NEW |