diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-28 22:22:44 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-28 22:22:44 +0000 |
commit | 4a44bc32d152f0583bb196339c2568351573e304 (patch) | |
tree | fc2513a618e59b3b620fd1f001acbce24e87611b /chrome/browser/process_singleton_win.cc | |
parent | c8b59f972e2c4b6fa92dab4101e9ccf0a15c20b4 (diff) | |
download | chromium_src-4a44bc32d152f0583bb196339c2568351573e304.zip chromium_src-4a44bc32d152f0583bb196339c2568351573e304.tar.gz chromium_src-4a44bc32d152f0583bb196339c2568351573e304.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@48533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_win.cc')
-rw-r--r-- | chrome/browser/process_singleton_win.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc index 09dec13..6454f66 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -156,6 +156,13 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } +ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { + NotifyResult result = NotifyOtherProcess(); + if (result != PROCESS_NONE) + return result; + return Create() ? PROCESS_NONE : PROFILE_IN_USE; +} + // For windows, there is no need to call Create() since the call is made in // the constructor but to avoid having more platform specific code in // browser_main.cc we tolerate a second call which will do nothing. |