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

Unified Diff: net/disk_cache/blockfile/block_files.cc

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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/blockfile/block_files.cc
diff --git a/net/disk_cache/blockfile/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index ae2e1b32e0bbd7afc814fea7c9721200d0998bcb..e28abe834bc919fc7e9f0905fd02eae6cb89fdb3 100644
--- a/net/disk_cache/blockfile/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -135,7 +135,7 @@ void BlockHeader::DeleteMapBlock(int index, int size) {
disk_cache::FileLock lock(header_);
STRESS_DCHECK((((1 << size) - 1) << (index % 8)) < 0x100);
- uint8 to_clear = ((1 << size) - 1) << (index % 8);
+ uint8 to_clear = ((1 << size) - 1) << (index % 8);
STRESS_DCHECK((byte_map[byte_index] & to_clear) == to_clear);
byte_map[byte_index] &= ~to_clear;
@@ -164,7 +164,7 @@ bool BlockHeader::UsedMapBlock(int index, int size) {
map_block >>= 4;
STRESS_DCHECK((((1 << size) - 1) << (index % 8)) < 0x100);
- uint8 to_clear = ((1 << size) - 1) << (index % 8);
+ uint8 to_clear = ((1 << size) - 1) << (index % 8);
return ((byte_map[byte_index] & to_clear) == to_clear);
}
@@ -180,7 +180,7 @@ void BlockHeader::FixAllocationCounters() {
for (int j = 0; j < 8; j++, map_block >>= 4) {
int type = GetMapBlockType(map_block);
if (type)
- header_->empty[type -1]++;
+ header_->empty[type - 1]++;
}
}
}
@@ -315,7 +315,8 @@ MappedFile* BlockFiles::GetFile(Addr address) {
return block_files_[file_index];
}
-bool BlockFiles::CreateBlock(FileType block_type, int block_count,
+bool BlockFiles::CreateBlock(FileType block_type,
+ int block_count,
Addr* block_address) {
DCHECK(thread_checker_->CalledOnValidThread());
DCHECK_NE(block_type, EXTERNAL);
@@ -361,8 +362,8 @@ void BlockFiles::DeleteBlock(Addr address, bool deep) {
Trace("DeleteBlock 0x%x", address.value());
size_t size = address.BlockSize() * address.num_blocks();
- size_t offset = address.start_block() * address.BlockSize() +
- kBlockHeaderSize;
+ size_t offset =
+ address.start_block() * address.BlockSize() + kBlockHeaderSize;
if (deep)
file->Write(zero_buffer_, size, offset);
@@ -433,8 +434,8 @@ bool BlockFiles::IsValid(Addr address) {
scoped_ptr<char[]> buffer;
buffer.reset(new char[Addr::BlockSizeForFileType(BLOCK_4K) * 4]);
size_t size = address.BlockSize() * address.num_blocks();
- size_t offset = address.start_block() * address.BlockSize() +
- kBlockHeaderSize;
+ size_t offset =
+ address.start_block() * address.BlockSize() + kBlockHeaderSize;
bool ok = file->Read(buffer.get(), size, offset);
DCHECK(ok);
}

Powered by Google App Engine
This is Rietveld 408576698