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/process_util.h" | 12 #include "base/process_util.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
15 #include "chrome/test/base/test_switches.h" | 15 #include "chrome/test/base/test_switches.h" |
16 #include "content/common/result_codes.h" | 16 #include "content/public/common/result_codes.h" |
17 | 17 |
18 using base::TimeDelta; | 18 using base::TimeDelta; |
19 using base::TimeTicks; | 19 using base::TimeTicks; |
20 | 20 |
21 void TerminateAllChromeProcesses(base::ProcessId browser_pid) { | 21 void TerminateAllChromeProcesses(base::ProcessId browser_pid) { |
22 ChromeProcessList process_pids(GetRunningChromeProcesses(browser_pid)); | 22 ChromeProcessList process_pids(GetRunningChromeProcesses(browser_pid)); |
23 | 23 |
24 ChromeProcessList::const_iterator it; | 24 ChromeProcessList::const_iterator it; |
25 for (it = process_pids.begin(); it != process_pids.end(); ++it) { | 25 for (it = process_pids.begin(); it != process_pids.end(); ++it) { |
26 base::ProcessHandle handle; | 26 base::ProcessHandle handle; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 base::ProcessHandle process) { | 151 base::ProcessHandle process) { |
152 #if !defined(OS_MACOSX) | 152 #if !defined(OS_MACOSX) |
153 process_metrics_.reset( | 153 process_metrics_.reset( |
154 base::ProcessMetrics::CreateProcessMetrics(process)); | 154 base::ProcessMetrics::CreateProcessMetrics(process)); |
155 #else | 155 #else |
156 process_metrics_.reset( | 156 process_metrics_.reset( |
157 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); | 157 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); |
158 #endif | 158 #endif |
159 process_handle_ = process; | 159 process_handle_ = process; |
160 } | 160 } |
OLD | NEW |