OLD | NEW |
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 "net/disk_cache/v3/index_table.h" | 5 #include "net/disk_cache/blockfile/index_table_v3.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bits.h" | 11 #include "base/bits.h" |
12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/disk_cache/disk_cache.h" | 14 #include "net/disk_cache/disk_cache.h" |
15 | 15 |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 bool IndexTable::MisplacedHash(const IndexCell& cell, uint32 hash) { | 1140 bool IndexTable::MisplacedHash(const IndexCell& cell, uint32 hash) { |
1141 if (!extra_bits_) | 1141 if (!extra_bits_) |
1142 return false; | 1142 return false; |
1143 | 1143 |
1144 uint32 mask = (1 << extra_bits_) - 1; | 1144 uint32 mask = (1 << extra_bits_) - 1; |
1145 hash = small_table_ ? hash >> kSmallTableHashShift : hash >> kHashShift; | 1145 hash = small_table_ ? hash >> kSmallTableHashShift : hash >> kHashShift; |
1146 return (GetHashValue(cell) & mask) != (hash & mask); | 1146 return (GetHashValue(cell) & mask) != (hash & mask); |
1147 } | 1147 } |
1148 | 1148 |
1149 } // namespace disk_cache | 1149 } // namespace disk_cache |
OLD | NEW |