blob: 4d64f0fa2873c0673d35e435a2ac60a2570bd814 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GOOGLE_CACHEINVALIDATION_MUTEX_H_
#define GOOGLE_CACHEINVALIDATION_MUTEX_H_
#include "base/logging.h"
#include "base/synchronization/lock.h"
namespace invalidation {
typedef base::Lock Mutex;
class MutexLock {
public:
explicit MutexLock(Mutex* m) : auto_lock_(*m) {}
private:
base::AutoLock auto_lock_;
DISALLOW_COPY_AND_ASSIGN(MutexLock);
};
} // namespace invalidation
#endif // GOOGLE_CACHEINVALIDATION_MUTEX_H_
|