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 #ifndef CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ | 5 #ifndef CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ |
6 #define CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ | 6 #define CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
| 12 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
11 #include "base/process/process_handle.h" | 14 #include "base/process/process_handle.h" |
12 #include "base/process/process_metrics.h" | 15 #include "base/process/process_metrics.h" |
| 16 #include "build/build_config.h" |
13 | 17 |
14 typedef std::vector<base::ProcessId> ChromeProcessList; | 18 typedef std::vector<base::ProcessId> ChromeProcessList; |
15 | 19 |
16 // Returns a vector of PIDs of all chrome processes (main and renderers etc) | 20 // Returns a vector of PIDs of all chrome processes (main and renderers etc) |
17 // based on |browser_pid|, the PID of the main browser process. | 21 // based on |browser_pid|, the PID of the main browser process. |
18 ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid); | 22 ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid); |
19 | 23 |
20 // Attempts to terminate all chrome processes in |process_list|. | 24 // Attempts to terminate all chrome processes in |process_list|. |
21 void TerminateAllChromeProcesses(const ChromeProcessList& process_list); | 25 void TerminateAllChromeProcesses(const ChromeProcessList& process_list); |
22 | 26 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 84 |
81 typedef std::vector<MacChromeProcessInfo> MacChromeProcessInfoList; | 85 typedef std::vector<MacChromeProcessInfo> MacChromeProcessInfoList; |
82 | 86 |
83 // Any ProcessId that info can't be found for will be left out. | 87 // Any ProcessId that info can't be found for will be left out. |
84 MacChromeProcessInfoList GetRunningMacProcessInfo( | 88 MacChromeProcessInfoList GetRunningMacProcessInfo( |
85 const ChromeProcessList& process_list); | 89 const ChromeProcessList& process_list); |
86 | 90 |
87 #endif // defined(OS_MACOSX) | 91 #endif // defined(OS_MACOSX) |
88 | 92 |
89 #endif // CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ | 93 #endif // CHROME_TEST_BASE_CHROME_PROCESS_UTIL_H_ |
OLD | NEW |