Index: net/disk_cache/blockfile/addr.h |
diff --git a/net/disk_cache/blockfile/addr.h b/net/disk_cache/blockfile/addr.h |
index 99d2c9307099a4a556a18a621b4aeb49a2b0282b..3828a1475b72ff6450febe6e6b5324797b5c6547 100644 |
--- a/net/disk_cache/blockfile/addr.h |
+++ b/net/disk_cache/blockfile/addr.h |
@@ -74,25 +74,17 @@ class NET_EXPORT_PRIVATE Addr { |
value_ = ((file_type << kFileTypeOffset) & kFileTypeMask) | |
(((max_blocks - 1) << kNumBlocksOffset) & kNumBlocksMask) | |
((block_file << kFileSelectorOffset) & kFileSelectorMask) | |
- (index & kStartBlockMask) | kInitializedMask; |
+ (index & kStartBlockMask) | kInitializedMask; |
} |
CacheAddr value() const { return value_; } |
- void set_value(CacheAddr address) { |
- value_ = address; |
- } |
+ void set_value(CacheAddr address) { value_ = address; } |
- bool is_initialized() const { |
- return (value_ & kInitializedMask) != 0; |
- } |
+ bool is_initialized() const { return (value_ & kInitializedMask) != 0; } |
- bool is_separate_file() const { |
- return (value_ & kFileTypeMask) == 0; |
- } |
+ bool is_separate_file() const { return (value_ & kFileTypeMask) == 0; } |
- bool is_block_file() const { |
- return !is_separate_file(); |
- } |
+ bool is_block_file() const { return !is_separate_file(); } |
FileType file_type() const { |
return static_cast<FileType>((value_ & kFileTypeMask) >> kFileTypeOffset); |
@@ -108,17 +100,11 @@ class NET_EXPORT_PRIVATE Addr { |
int start_block() const; |
int num_blocks() const; |
bool SetFileNumber(int file_number); |
- int BlockSize() const { |
- return BlockSizeForFileType(file_type()); |
- } |
+ int BlockSize() const { return BlockSizeForFileType(file_type()); } |
- bool operator==(Addr other) const { |
- return value_ == other.value_; |
- } |
+ bool operator==(Addr other) const { return value_ == other.value_; } |
- bool operator!=(Addr other) const { |
- return value_ != other.value_; |
- } |
+ bool operator!=(Addr other) const { return value_ != other.value_; } |
static int BlockSizeForFileType(FileType file_type) { |
switch (file_type) { |
@@ -165,20 +151,18 @@ class NET_EXPORT_PRIVATE Addr { |
bool SanityCheckForRankings() const; |
private: |
- uint32 reserved_bits() const { |
- return value_ & kReservedBitsMask; |
- } |
- |
- static const uint32 kInitializedMask = 0x80000000; |
- static const uint32 kFileTypeMask = 0x70000000; |
- static const uint32 kFileTypeOffset = 28; |
- static const uint32 kReservedBitsMask = 0x0c000000; |
- static const uint32 kNumBlocksMask = 0x03000000; |
- static const uint32 kNumBlocksOffset = 24; |
- static const uint32 kFileSelectorMask = 0x00ff0000; |
+ uint32 reserved_bits() const { return value_ & kReservedBitsMask; } |
+ |
+ static const uint32 kInitializedMask = 0x80000000; |
+ static const uint32 kFileTypeMask = 0x70000000; |
+ static const uint32 kFileTypeOffset = 28; |
+ static const uint32 kReservedBitsMask = 0x0c000000; |
+ static const uint32 kNumBlocksMask = 0x03000000; |
+ static const uint32 kNumBlocksOffset = 24; |
+ static const uint32 kFileSelectorMask = 0x00ff0000; |
static const uint32 kFileSelectorOffset = 16; |
- static const uint32 kStartBlockMask = 0x0000FFFF; |
- static const uint32 kFileNameMask = 0x0FFFFFFF; |
+ static const uint32 kStartBlockMask = 0x0000FFFF; |
+ static const uint32 kFileNameMask = 0x0FFFFFFF; |
CacheAddr value_; |
}; |