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

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

Issue 1477533002: Remove kint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8max
Patch Set: includes Created 5 years 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
« no previous file with comments | « net/disk_cache/blockfile/disk_format_base.h ('k') | ui/app_list/speech_ui_model.cc » ('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) 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 <stdint.h>
11
10 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
11 #include "net/disk_cache/blockfile/disk_format_base.h" 13 #include "net/disk_cache/blockfile/disk_format_base.h"
12 14
13 namespace disk_cache { 15 namespace disk_cache {
14 16
15 // This class implements a file lock that lives on the header of a memory mapped 17 // This class implements a file lock that lives on the header of a memory mapped
16 // file. This is NOT a thread related lock, it is a lock to detect corruption 18 // file. This is NOT a thread related lock, it is a lock to detect corruption
17 // of the file when the process crashes in the middle of an update. 19 // of the file when the process crashes in the middle of an update.
18 // The lock is acquired on the constructor and released on the destructor. 20 // The lock is acquired on the constructor and released on the destructor.
19 // The typical use of the class is: 21 // The typical use of the class is:
(...skipping 10 matching lines...) Expand all
30 class NET_EXPORT_PRIVATE FileLock { 32 class NET_EXPORT_PRIVATE FileLock {
31 public: 33 public:
32 explicit FileLock(BlockFileHeader* header); 34 explicit FileLock(BlockFileHeader* header);
33 virtual ~FileLock(); 35 virtual ~FileLock();
34 36
35 // Virtual to make sure the compiler never inlines the calls. 37 // Virtual to make sure the compiler never inlines the calls.
36 virtual void Lock(); 38 virtual void Lock();
37 virtual void Unlock(); 39 virtual void Unlock();
38 private: 40 private:
39 bool acquired_; 41 bool acquired_;
40 volatile int32* updating_; 42 volatile int32_t* updating_;
41 }; 43 };
42 44
43 } // namespace disk_cache 45 } // namespace disk_cache
44 46
45 #endif // NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_ 47 #endif // NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/disk_format_base.h ('k') | ui/app_list/speech_ui_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698