From 4a44bc32d152f0583bb196339c2568351573e304 Mon Sep 17 00:00:00 2001 From: "mattm@chromium.org" Date: Fri, 28 May 2010 22:22:44 +0000 Subject: 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 --- chrome/browser/process_singleton_win.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/browser/process_singleton_win.cc') 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. -- cgit v1.1