- add sources.
[platform/framework/web/crosswalk.git] / src / third_party / cacheinvalidation / overrides / google / cacheinvalidation / deps / mutex.h
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.
4
5 #ifndef GOOGLE_CACHEINVALIDATION_DEPS_MUTEX_H_
6 #define GOOGLE_CACHEINVALIDATION_DEPS_MUTEX_H_
7
8 #include "base/logging.h"
9 #include "base/synchronization/lock.h"
10
11 namespace invalidation {
12
13 typedef base::Lock Mutex;
14
15 class MutexLock {
16  public:
17   explicit MutexLock(Mutex* m) : auto_lock_(*m) {}
18
19  private:
20   base::AutoLock auto_lock_;
21   DISALLOW_COPY_AND_ASSIGN(MutexLock);
22 };
23
24 }  // namespace invalidation
25
26 #endif  // GOOGLE_CACHEINVALIDATION_DEPS_MUTEX_H_