summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton.h
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 01:52:28 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 01:52:28 +0000
commita2c2bfdd83030cd9063926f899c28db419ff35ae (patch)
treea4abbe8336a527fed558d46df9e892205e557e4b /chrome/browser/process_singleton.h
parent9192f2d845e97aff731e11e84f7fbc79b2c5e50b (diff)
downloadchromium_src-a2c2bfdd83030cd9063926f899c28db419ff35ae.zip
chromium_src-a2c2bfdd83030cd9063926f899c28db419ff35ae.tar.gz
chromium_src-a2c2bfdd83030cd9063926f899c28db419ff35ae.tar.bz2
ProcessSingleton(all): create the lock immediately after failing to connect to an existing process.
ProcessSingletonLinux: if creating the lock fails, try to notify again. BUG=44417 TEST=manual Review URL: http://codereview.chromium.org/2066014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton.h')
-rw-r--r--chrome/browser/process_singleton.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 4ae0b10..d2ee14f 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -37,6 +37,7 @@ class ProcessSingleton : public NonThreadSafe {
PROCESS_NONE,
PROCESS_NOTIFIED,
PROFILE_IN_USE,
+ LOCK_ERROR,
};
explicit ProcessSingleton(const FilePath& user_data_dir);
@@ -52,11 +53,20 @@ class ProcessSingleton : public NonThreadSafe {
// first one, so this function won't find it.
NotifyResult NotifyOtherProcess();
+ // Notify another process, if available. Otherwise sets ourselves as the
+ // singleton instance. Returns PROCESS_NONE if we became the singleton
+ // instance.
+ NotifyResult NotifyOtherProcessOrCreate();
+
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Exposed for testing. We use a timeout on Linux, and in tests we want
// this timeout to be short.
NotifyResult NotifyOtherProcessWithTimeout(const CommandLine& command_line,
- int timeout_seconds);
+ int timeout_seconds,
+ bool kill_unresponsive);
+ NotifyResult NotifyOtherProcessWithTimeoutOrCreate(
+ const CommandLine& command_line,
+ int timeout_seconds);
#endif
// Sets ourself up as the singleton instance. Returns true on success. If