summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util.h
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 14:37:38 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 14:37:38 +0000
commit4b59cf24ca1128e5b3f3b4fa8b585575d44222f7 (patch)
tree063ccb2187e2285260b309e284b2f2170b0240e4 /chrome/test/chrome_process_util.h
parentfd7bdcc89b6483ebbfc4eaca6a7b0ba1fe1aca1b (diff)
downloadchromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.zip
chromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.tar.gz
chromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.tar.bz2
Make running chrome process detection in ui tests more reliable.
Also drops fragile code. TEST=Covered by ui_tests. BUG=10840 Review URL: http://codereview.chromium.org/545006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_process_util.h')
-rw-r--r--chrome/test/chrome_process_util.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/test/chrome_process_util.h b/chrome/test/chrome_process_util.h
index 4fb1513..94e0355 100644
--- a/chrome/test/chrome_process_util.h
+++ b/chrome/test/chrome_process_util.h
@@ -13,16 +13,13 @@
typedef std::vector<base::ProcessId> ChromeProcessList;
-// Returns PID of browser process running with user data dir |data_dir|.
-// Returns -1 on error.
-base::ProcessId ChromeBrowserProcessId(const FilePath& data_dir);
+// Returns a vector of PIDs of all chrome processes (main and renderers etc)
+// based on |browser_pid|, the PID of the main browser process.
+ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid);
-// Returns a vector of PIDs of chrome processes (main and renderers etc)
-// associated with user data dir |data_dir|. On error returns empty vector.
-ChromeProcessList GetRunningChromeProcesses(const FilePath& data_dir);
-
-// Attempts to terminate all chrome processes associated with |data_dir|.
-void TerminateAllChromeProcesses(const FilePath& data_dir);
+// Attempts to terminate all chrome processes launched by (and including)
+// |browser_pid|.
+void TerminateAllChromeProcesses(base::ProcessId browser_pid);
// A wrapper class for tests to use in fetching process metrics.
// Delegates everything we need to base::ProcessMetrics, except