Chromium Code Reviews| Index: base/shared_memory_win.cc |
| =================================================================== |
| --- base/shared_memory_win.cc (revision 65236) |
| +++ base/shared_memory_win.cc (working copy) |
| @@ -197,17 +197,16 @@ |
| } |
| void SharedMemory::Lock() { |
| - Lock(INFINITE); |
| + Lock(INFINITE, NULL); |
| } |
| -bool SharedMemory::Lock(uint32 timeout_ms) { |
| +bool SharedMemory::Lock(uint32 timeout_ms, SECURITY_ATTRIBUTES* sec_attr) { |
| if (lock_ == NULL) { |
| std::wstring name = name_; |
| name.append(L"lock"); |
| - lock_ = CreateMutex(NULL, FALSE, name.c_str()); |
| - DCHECK(lock_ != NULL); |
| + lock_ = CreateMutex(sec_attr, FALSE, name.c_str()); |
| if (lock_ == NULL) { |
| - DLOG(ERROR) << "Could not create mutex" << GetLastError(); |
| + LOG(ERROR) << "Could not create mutex" << GetLastError(); |
|
tommi (sloooow) - chröme
2010/11/15 19:33:30
change this to PLOG (and remove the call to GLE)?
robertshield
2010/11/15 20:32:18
Done.
|
| return false; // there is nothing good we can do here. |
| } |
| } |