summaryrefslogtreecommitdiffstats
path: root/base/shared_memory.h
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 19:16:07 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 19:16:07 +0000
commit8cc419448037675e5742586429bb6c00606ce8f9 (patch)
tree61cd63e10a4c4bd6c4515beb3c0f1489bba0b397 /base/shared_memory.h
parent39549bf8f876b17f481e753161166370064458bd (diff)
downloadchromium_src-8cc419448037675e5742586429bb6c00606ce8f9.zip
chromium_src-8cc419448037675e5742586429bb6c00606ce8f9.tar.gz
chromium_src-8cc419448037675e5742586429bb6c00606ce8f9.tar.bz2
Implementation of single-module-per-logon-session-per-profile implementation for Chrome Frame.
BUG=61383 TEST=Run IE with version X of CF loaded. Register version Y of CF. Run a second IE process, notice that version Y when loaded defers to version X. Review URL: http://codereview.chromium.org/4144008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/shared_memory.h')
-rw-r--r--base/shared_memory.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/base/shared_memory.h b/base/shared_memory.h
index 79ea8fd..719eb69 100644
--- a/base/shared_memory.h
+++ b/base/shared_memory.h
@@ -43,6 +43,13 @@ class SharedMemory {
public:
SharedMemory();
+#if defined(OS_WIN)
+ // Similar to the default constructor, except that this allows for
+ // calling Lock() to acquire the named mutex before either Create or Open
+ // are called on Windows.
+ explicit SharedMemory(const std::wstring& name);
+#endif
+
// Create a new SharedMemory object from an existing, open
// shared memory file.
SharedMemory(SharedMemoryHandle handle, bool read_only);
@@ -165,6 +172,12 @@ class SharedMemory {
// across Mac and Linux.
void Lock();
+#if defined(OS_WIN)
+ // A Lock() implementation with a timeout. Returns true if the Lock() has
+ // been acquired, false if the timeout was reached.
+ bool Lock(uint32 timeout_ms);
+#endif
+
// Releases the shared memory lock.
void Unlock();