Index: net/disk_cache/blockfile/index_table_v3_unittest.cc |
diff --git a/net/disk_cache/blockfile/index_table_v3_unittest.cc b/net/disk_cache/blockfile/index_table_v3_unittest.cc |
index b7a93a2d9004e109152b1a87c4dd494cd687d1e7..534e4a29ea574765b205a393aebe755df912593f 100644 |
--- a/net/disk_cache/blockfile/index_table_v3_unittest.cc |
+++ b/net/disk_cache/blockfile/index_table_v3_unittest.cc |
@@ -108,19 +108,21 @@ void TestCacheTables::GetInitData(IndexTableInitData* result) { |
result->extra_table = extra_table_.get(); |
result->backup_header.reset(new disk_cache::IndexHeaderV3); |
- memcpy(result->backup_header.get(), result->index_bitmap, |
+ memcpy(result->backup_header.get(), |
+ result->index_bitmap, |
sizeof(result->index_bitmap->header)); |
result->backup_bitmap.reset(new uint32[num_bitmap_bytes_ / sizeof(uint32)]); |
- memcpy(result->backup_bitmap.get(), result->index_bitmap->bitmap, |
+ memcpy(result->backup_bitmap.get(), |
+ result->index_bitmap->bitmap, |
num_bitmap_bytes_); |
} |
void TestCacheTables::CopyFrom(const TestCacheTables& other) { |
disk_cache::IndexBitmap* this_bitmap = |
- reinterpret_cast<disk_cache::IndexBitmap*>(main_bitmap_.get()); |
+ reinterpret_cast<disk_cache::IndexBitmap*>(main_bitmap_.get()); |
disk_cache::IndexBitmap* other_bitmap = |
- reinterpret_cast<disk_cache::IndexBitmap*>(other.main_bitmap_.get()); |
+ reinterpret_cast<disk_cache::IndexBitmap*>(other.main_bitmap_.get()); |
DCHECK_GE(this_bitmap->header.table_len, other_bitmap->header.table_len); |
DCHECK_GE(num_bitmap_bytes_, other.num_bitmap_bytes_); |
@@ -129,9 +131,11 @@ void TestCacheTables::CopyFrom(const TestCacheTables& other) { |
int main_table_buckets = (other_bitmap->header.table_len * 2 / 3) / 4; |
int extra_table_buckets = (other_bitmap->header.table_len * 1 / 3) / 4; |
- memcpy(main_table_.get(), other.main_table_.get(), |
+ memcpy(main_table_.get(), |
+ other.main_table_.get(), |
main_table_buckets * sizeof(disk_cache::IndexBucket)); |
- memcpy(extra_table_.get(), other.extra_table_.get(), |
+ memcpy(extra_table_.get(), |
+ other.extra_table_.get(), |
extra_table_buckets * sizeof(disk_cache::IndexBucket)); |
this_bitmap->header.num_entries = other_bitmap->header.num_entries; |
@@ -157,8 +161,8 @@ TEST(DiskCacheIndexTable, EntryCell) { |
for (int i = 0; i < 4; i++) { |
SCOPED_TRACE(i); |
- EntryCell entry = EntryCell::GetEntryCellForTest(cell_num, hash, addr, NULL, |
- small_table); |
+ EntryCell entry = |
+ EntryCell::GetEntryCellForTest(cell_num, hash, addr, NULL, small_table); |
EXPECT_EQ(disk_cache::ENTRY_NO_USE, entry.GetGroup()); |
EXPECT_EQ(disk_cache::ENTRY_NEW, entry.GetState()); |
@@ -181,8 +185,8 @@ TEST(DiskCacheIndexTable, EntryCell) { |
IndexCell cell; |
entry.SerializaForTest(&cell); |
- EntryCell entry2 = EntryCell::GetEntryCellForTest(cell_num, hash, addr, |
- &cell, small_table); |
+ EntryCell entry2 = EntryCell::GetEntryCellForTest( |
+ cell_num, hash, addr, &cell, small_table); |
EXPECT_EQ(addr.value(), entry2.GetAddress().value()); |
@@ -198,7 +202,7 @@ TEST(DiskCacheIndexTable, EntryCell) { |
state = disk_cache::ENTRY_USED; |
group = disk_cache::ENTRY_EVICTED; |
addr = disk_cache::Addr(disk_cache::BLOCK_EVICTED, 1, 6, 0x18a5); |
- reuse = 15; // 4 bits |
+ reuse = 15; // 4 bits |
timestamp = 0xfffff; // 20 bits. |
} |
} |
@@ -280,7 +284,7 @@ TEST(DiskCacheIndexTable, Basics) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
} |
@@ -341,7 +345,7 @@ TEST(DiskCacheIndexTable, SameHash) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
} |
@@ -482,7 +486,7 @@ TEST(DiskCacheIndexTable, Iterations) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
if (i < 10 || i == 40) { |
@@ -597,7 +601,7 @@ TEST(DiskCacheIndexTable, Doubling) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
} |
size *= 2; |
@@ -631,7 +635,7 @@ TEST(DiskCacheIndexTable, BucketChains) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
} |
@@ -651,7 +655,7 @@ TEST(DiskCacheIndexTable, BucketChains) { |
EntryCell entry = index.CreateEntryCell(hash, addr); |
EXPECT_TRUE(entry.IsValid()); |
- disk_cache::CellInfo info = { hash, addr }; |
+ disk_cache::CellInfo info = {hash, addr}; |
entries.push_back(info); |
} |