diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 23:23:53 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 23:23:53 +0000 |
commit | 95259c6a4ab6fd2c6258b488fc08c45041a8d102 (patch) | |
tree | 6754e39a92bcfcb9f725667e2a1a4678215ad7eb /chrome/browser/process_singleton_linux.cc | |
parent | 1c35a4843a9b0b4db2d317c08a1dd3181c3c7be8 (diff) | |
download | chromium_src-95259c6a4ab6fd2c6258b488fc08c45041a8d102.zip chromium_src-95259c6a4ab6fd2c6258b488fc08c45041a8d102.tar.gz chromium_src-95259c6a4ab6fd2c6258b488fc08c45041a8d102.tar.bz2 |
aura: Use native ProcessSingleton implementations.
This makes us use either ProcessSingletonLinux or
ProcessSingletonWin.
Tested on a Chrome OS device by starting two separate Chrome
processes with the same profile directory. The second
process just opened another window in the original Aura
desktop instead of crashing after trying to open a locked
database as before. sky@ was kind enough to run this for me
on Windows and confirm that it behaves similarly there.
BUG=99713
TEST=manual: see above
Review URL: http://codereview.chromium.org/8382023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_linux.cc')
-rw-r--r-- | chrome/browser/process_singleton_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc index 5b122ef..cd6ccdb 100644 --- a/chrome/browser/process_singleton_linux.cc +++ b/chrome/browser/process_singleton_linux.cc @@ -43,7 +43,9 @@ #include <errno.h> #include <fcntl.h> +#if defined(TOOLKIT_USES_GTK) #include <gdk/gdk.h> +#endif #include <signal.h> #include <sys/socket.h> #include <sys/stat.h> @@ -311,6 +313,8 @@ void DisplayProfileInUseError(const std::string& lock_path, if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kNoProcessSingletonDialog)) ProcessSingletonDialog::ShowAndRun(UTF16ToUTF8(error)); +#else + NOTIMPLEMENTED(); #endif } @@ -874,9 +878,11 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( // The other process is shutting down, it's safe to start a new process. return PROCESS_NONE; } else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) { +#if defined(TOOLKIT_USES_GTK) // Notify the window manager that we've started up; if we do not open a // window, GTK will not automatically call this for us. gdk_notify_startup_complete(); +#endif // Assume the other process is handling the request. return PROCESS_NOTIFIED; } |