Remove chrome://apps from chrome-urls on ChromeOS.
[chromium-blink-merge.git] / rlz / win / lib / lib_mutex.h
blobd0f0eba33d53e2fb37f9ed5cd05b6dad587a8deb
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef RLZ_WIN_LIB_LIB_MUTEX_H_
6 #define RLZ_WIN_LIB_LIB_MUTEX_H_
8 #include <windows.h>
10 namespace rlz_lib {
11 // Cross-process mutex to guarantee serialization of RLZ key accesses.
12 class LibMutex {
13 public:
14 LibMutex();
15 ~LibMutex();
17 bool failed() const { return !acquired_; }
19 private:
20 bool acquired_;
21 HANDLE mutex_;
24 } // namespace rlz_lib
26 #endif // RLZ_WIN_LIB_LIB_MUTEX_H_