Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5345)

Unified Diff: chrome/test/chrome_process_util.cc

Issue 1689012: Move common code into process_util.cc (Closed)
Patch Set: More fixes Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/process_singleton_win_uitest.cc ('k') | chrome_frame/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chrome_process_util.cc
diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc
index 5f47df07be9601c29a7e413c147c37cf33d749f9..8e86e605b6ed7328d37a20eb99a14d7839a847a1 100644
--- a/chrome/test/chrome_process_util.cc
+++ b/chrome/test/chrome_process_util.cc
@@ -58,8 +58,8 @@ class ChildProcessFilter : public base::ProcessFilter {
explicit ChildProcessFilter(std::vector<base::ProcessId> parent_pids)
: parent_pids_(parent_pids.begin(), parent_pids.end()) {}
- virtual bool Includes(base::ProcessId pid, base::ProcessId parent_pid) const {
- return parent_pids_.find(parent_pid) != parent_pids_.end();
+ virtual bool Includes(const base::ProcessEntry& entry) const {
+ return parent_pids_.find(entry.parent_pid()) != parent_pids_.end();
}
private:
@@ -76,11 +76,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) {
ChildProcessFilter filter(browser_pid);
base::NamedProcessIterator it(chrome::kBrowserProcessExecutableName, &filter);
while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) {
-#if defined(OS_WIN)
- result.push_back(process_entry->th32ProcessID);
-#elif defined(OS_POSIX)
- result.push_back(process_entry->pid);
-#endif
+ result.push_back(process_entry->pid());
}
#if defined(OS_LINUX)
@@ -92,7 +88,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) {
base::NamedProcessIterator it(chrome::kBrowserProcessExecutableName,
&filter);
while (const base::ProcessEntry* process_entry = it.NextProcessEntry())
- result.push_back(process_entry->pid);
+ result.push_back(process_entry->pid());
}
#endif // defined(OS_LINUX)
@@ -105,7 +101,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) {
base::NamedProcessIterator it(chrome::kHelperProcessExecutableName,
&filter);
while (const base::ProcessEntry* process_entry = it.NextProcessEntry())
- result.push_back(process_entry->pid);
+ result.push_back(process_entry->pid());
}
#endif // defined(OS_MACOSX)
« no previous file with comments | « chrome/browser/process_singleton_win_uitest.cc ('k') | chrome_frame/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698