From 8cc419448037675e5742586429bb6c00606ce8f9 Mon Sep 17 00:00:00 2001 From: "robertshield@chromium.org" <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Fri, 5 Nov 2010 19:16:07 +0000 Subject: 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 --- base/shared_memory.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'base/shared_memory.h') 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(); -- cgit v1.1