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/test/base/chrome_process_util.h" | 5 #include "chrome/test/base/chrome_process_util.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/macros.h" |
12 #include "base/process/process.h" | 13 #include "base/process/process.h" |
13 #include "base/process/process_iterator.h" | 14 #include "base/process/process_iterator.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "build/build_config.h" |
15 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/test/base/test_switches.h" | 18 #include "chrome/test/base/test_switches.h" |
17 #include "content/public/common/result_codes.h" | 19 #include "content/public/common/result_codes.h" |
18 | 20 |
19 using base::TimeDelta; | 21 using base::TimeDelta; |
20 using base::TimeTicks; | 22 using base::TimeTicks; |
21 | 23 |
22 void TerminateAllChromeProcesses(const ChromeProcessList& process_pids) { | 24 void TerminateAllChromeProcesses(const ChromeProcessList& process_pids) { |
23 ChromeProcessList::const_iterator it; | 25 ChromeProcessList::const_iterator it; |
24 for (it = process_pids.begin(); it != process_pids.end(); ++it) { | 26 for (it = process_pids.begin(); it != process_pids.end(); ++it) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 base::ProcessHandle process) { | 112 base::ProcessHandle process) { |
111 #if !defined(OS_MACOSX) | 113 #if !defined(OS_MACOSX) |
112 process_metrics_.reset( | 114 process_metrics_.reset( |
113 base::ProcessMetrics::CreateProcessMetrics(process)); | 115 base::ProcessMetrics::CreateProcessMetrics(process)); |
114 #else | 116 #else |
115 process_metrics_.reset( | 117 process_metrics_.reset( |
116 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); | 118 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); |
117 #endif | 119 #endif |
118 process_handle_ = process; | 120 process_handle_ = process; |
119 } | 121 } |
OLD | NEW |