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

Side by Side Diff: net/disk_cache/blockfile/file_lock.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
8 #define NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 17 matching lines...) Expand all
28 // the operations are inlined / optimized, the "locked" operations can happen 28 // the operations are inlined / optimized, the "locked" operations can happen
29 // outside the lock. 29 // outside the lock.
30 class NET_EXPORT_PRIVATE FileLock { 30 class NET_EXPORT_PRIVATE FileLock {
31 public: 31 public:
32 explicit FileLock(BlockFileHeader* header); 32 explicit FileLock(BlockFileHeader* header);
33 virtual ~FileLock(); 33 virtual ~FileLock();
34 34
35 // Virtual to make sure the compiler never inlines the calls. 35 // Virtual to make sure the compiler never inlines the calls.
36 virtual void Lock(); 36 virtual void Lock();
37 virtual void Unlock(); 37 virtual void Unlock();
38
38 private: 39 private:
39 bool acquired_; 40 bool acquired_;
40 volatile int32* updating_; 41 volatile int32* updating_;
41 }; 42 };
42 43
43 } // namespace disk_cache 44 } // namespace disk_cache
44 45
45 #endif // NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_ 46 #endif // NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698