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 <vector> | 7 #include <vector> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
14 #include "chrome/test/test_switches.h" | 14 #include "chrome/test/base/test_switches.h" |
15 #include "content/common/result_codes.h" | 15 #include "content/common/result_codes.h" |
16 | 16 |
17 using base::TimeDelta; | 17 using base::TimeDelta; |
18 using base::TimeTicks; | 18 using base::TimeTicks; |
19 | 19 |
20 void TerminateAllChromeProcesses(base::ProcessId browser_pid) { | 20 void TerminateAllChromeProcesses(base::ProcessId browser_pid) { |
21 ChromeProcessList process_pids(GetRunningChromeProcesses(browser_pid)); | 21 ChromeProcessList process_pids(GetRunningChromeProcesses(browser_pid)); |
22 | 22 |
23 ChromeProcessList::const_iterator it; | 23 ChromeProcessList::const_iterator it; |
24 for (it = process_pids.begin(); it != process_pids.end(); ++it) { | 24 for (it = process_pids.begin(); it != process_pids.end(); ++it) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 base::ProcessHandle process) { | 125 base::ProcessHandle process) { |
126 #if !defined(OS_MACOSX) | 126 #if !defined(OS_MACOSX) |
127 process_metrics_.reset( | 127 process_metrics_.reset( |
128 base::ProcessMetrics::CreateProcessMetrics(process)); | 128 base::ProcessMetrics::CreateProcessMetrics(process)); |
129 #else | 129 #else |
130 process_metrics_.reset( | 130 process_metrics_.reset( |
131 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); | 131 base::ProcessMetrics::CreateProcessMetrics(process, NULL)); |
132 #endif | 132 #endif |
133 process_handle_ = process; | 133 process_handle_ = process; |
134 } | 134 } |
OLD | NEW |