Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: base/lock.h

Issue 5091005: FBTF: Remove unneeded headers from base/ (part 9) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win build Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util_posix.cc ('k') | base/lock_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_LOCK_H_ 5 #ifndef BASE_LOCK_H_
6 #define BASE_LOCK_H_ 6 #define BASE_LOCK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/lock_impl.h" 9 #include "base/lock_impl.h"
10 #include "base/platform_thread.h"
10 11
11 // A convenient wrapper for an OS specific critical section. The only real 12 // A convenient wrapper for an OS specific critical section. The only real
12 // intelligence in this class is in debug mode for the support for the 13 // intelligence in this class is in debug mode for the support for the
13 // AssertAcquired() method. 14 // AssertAcquired() method.
14 15
15 class Lock { 16 class Lock {
16 public: 17 public:
17 #if defined(NDEBUG) // Optimized wrapper implementation 18 #if defined(NDEBUG) // Optimized wrapper implementation
18 Lock() : lock_() {} 19 Lock() : lock_() {}
19 ~Lock() {} 20 ~Lock() {}
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ~AutoUnlock() { 118 ~AutoUnlock() {
118 lock_.Acquire(); 119 lock_.Acquire();
119 } 120 }
120 121
121 private: 122 private:
122 Lock& lock_; 123 Lock& lock_;
123 DISALLOW_COPY_AND_ASSIGN(AutoUnlock); 124 DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
124 }; 125 };
125 126
126 #endif // BASE_LOCK_H_ 127 #endif // BASE_LOCK_H_
OLDNEW
« no previous file with comments | « base/file_util_posix.cc ('k') | base/lock_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698