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

Side by Side Diff: net/disk_cache/blockfile/index_table_v3_unittest.cc

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to upstream Created 6 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "net/disk_cache/addr.h" 7 #include "net/disk_cache/blockfile/addr.h"
8 #include "net/disk_cache/v3/disk_format_v3.h" 8 #include "net/disk_cache/blockfile/disk_format_v3.h"
9 #include "net/disk_cache/v3/index_table.h" 9 #include "net/disk_cache/blockfile/index_table_v3.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using disk_cache::EntryCell; 12 using disk_cache::EntryCell;
13 using disk_cache::IndexCell; 13 using disk_cache::IndexCell;
14 using disk_cache::IndexTable; 14 using disk_cache::IndexTable;
15 using disk_cache::IndexTableInitData; 15 using disk_cache::IndexTableInitData;
16 16
17 namespace { 17 namespace {
18 18
19 int GetChecksum(const IndexCell& source) { 19 int GetChecksum(const IndexCell& source) {
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 697
698 uint32 hash = 0; 698 uint32 hash = 0;
699 disk_cache::Addr addr(disk_cache::BLOCK_ENTRIES, 1, 5, 6); 699 disk_cache::Addr addr(disk_cache::BLOCK_ENTRIES, 1, 5, 6);
700 EntryCell entry = index.CreateEntryCell(hash, addr); 700 EntryCell entry = index.CreateEntryCell(hash, addr);
701 EXPECT_TRUE(entry.IsValid()); 701 EXPECT_TRUE(entry.IsValid());
702 702
703 index.OnBackupTimer(); 703 index.OnBackupTimer();
704 int expected = (1024 + 512) / 8 + sizeof(disk_cache::IndexHeaderV3); 704 int expected = (1024 + 512) / 8 + sizeof(disk_cache::IndexHeaderV3);
705 EXPECT_EQ(expected, backend.buffer_len()); 705 EXPECT_EQ(expected, backend.buffer_len());
706 } 706 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698