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

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

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 years, 2 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
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/blockfile/addr.h" 7 #include "net/disk_cache/blockfile/addr.h"
8 #include "net/disk_cache/blockfile/disk_format_v3.h" 8 #include "net/disk_cache/blockfile/disk_format_v3.h"
9 #include "net/disk_cache/blockfile/index_table_v3.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"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 class MockIndexBackend : public disk_cache::IndexTableBackend { 30 class MockIndexBackend : public disk_cache::IndexTableBackend {
31 public: 31 public:
32 MockIndexBackend() : grow_called_(false), buffer_len_(-1) {} 32 MockIndexBackend() : grow_called_(false), buffer_len_(-1) {}
33 virtual ~MockIndexBackend() {} 33 virtual ~MockIndexBackend() {}
34 34
35 bool grow_called() const { return grow_called_; } 35 bool grow_called() const { return grow_called_; }
36 int buffer_len() const { return buffer_len_; } 36 int buffer_len() const { return buffer_len_; }
37 37
38 virtual void GrowIndex() OVERRIDE { grow_called_ = true; } 38 virtual void GrowIndex() override { grow_called_ = true; }
39 virtual void SaveIndex(net::IOBuffer* buffer, int buffer_len) OVERRIDE { 39 virtual void SaveIndex(net::IOBuffer* buffer, int buffer_len) override {
40 buffer_len_ = buffer_len; 40 buffer_len_ = buffer_len;
41 } 41 }
42 virtual void DeleteCell(EntryCell cell) OVERRIDE {} 42 virtual void DeleteCell(EntryCell cell) override {}
43 virtual void FixCell(EntryCell cell) OVERRIDE {} 43 virtual void FixCell(EntryCell cell) override {}
44 44
45 private: 45 private:
46 bool grow_called_; 46 bool grow_called_;
47 int buffer_len_; 47 int buffer_len_;
48 }; 48 };
49 49
50 class TestCacheTables { 50 class TestCacheTables {
51 public: 51 public:
52 // |num_entries| is the capacity of the main table. The extra table is half 52 // |num_entries| is the capacity of the main table. The extra table is half
53 // the size of the main table. 53 // the size of the main table.
(...skipping 643 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
« no previous file with comments | « net/disk_cache/blockfile/in_flight_backend_io.h ('k') | net/disk_cache/blockfile/mapped_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698