summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton.h
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 01:29:28 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 01:29:28 +0000
commit53f4826c9fe6bea1718a499dc686f26dbf24ab50 (patch)
treeb2d1f444aa73e927ff215e7dc78e851bc213a056 /chrome/browser/process_singleton.h
parent34d3608cd3c631811eef51bc5cdd8ce2a2670076 (diff)
downloadchromium_src-53f4826c9fe6bea1718a499dc686f26dbf24ab50.zip
chromium_src-53f4826c9fe6bea1718a499dc686f26dbf24ab50.tar.gz
chromium_src-53f4826c9fe6bea1718a499dc686f26dbf24ab50.tar.bz2
Move the SingletonSocket to a temporary directory
This is to workaround problems on certain network filesystems (notably AFS) which do not support Unix domain sockets. We move the sockets into a temporary folder and symlink. To avoid the possibility of a dangling link to a missing (and later intercepted) remote directory, we create and check cookie files and rely on the stickiness of /tmp/ to avoid a race condition in the check. R=mattm BUG=44606 TEST=ProcessSingletonLinuxTest.* Review URL: http://codereview.chromium.org/2838034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton.h')
-rw-r--r--chrome/browser/process_singleton.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 19e40a6..57dd446 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -20,6 +20,9 @@
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
#include "gfx/native_widget_types.h"
+#if defined(USE_X11)
+#include "base/scoped_temp_dir.h"
+#endif
class CommandLine;
class FilePath;
@@ -139,6 +142,12 @@ class ProcessSingleton : public NonThreadSafe {
// Path in file system to the lock.
FilePath lock_path_;
+ // Path in file system to the cookie file.
+ FilePath cookie_path_;
+
+ // Temporary directory to hold the socket.
+ ScopedTempDir socket_dir_;
+
// Helper class for linux specific messages. LinuxWatcher is ref counted
// because it posts messages between threads.
class LinuxWatcher;