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

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

Issue 399313006: Move bit_cast from base/macros.h to its own header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile after r368203 Created 4 years, 11 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
« no previous file with comments | « net/disk_cache/blockfile/disk_format_v3.h ('k') | net/filter/brotli_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/disk_cache/blockfile/index_table_v3.h" 5 #include "net/disk_cache/blockfile/index_table_v3.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bit_cast.h"
12 #include "base/bits.h" 13 #include "base/bits.h"
13 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
14 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
15 #include "net/disk_cache/disk_cache.h" 16 #include "net/disk_cache/disk_cache.h"
16 17
17 using base::Time; 18 using base::Time;
18 using base::TimeDelta; 19 using base::TimeDelta;
19 using disk_cache::CellInfo; 20 using disk_cache::CellInfo;
20 using disk_cache::CellList; 21 using disk_cache::CellList;
21 using disk_cache::IndexCell; 22 using disk_cache::IndexCell;
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 bool IndexTable::MisplacedHash(const IndexCell& cell, uint32_t hash) { 1141 bool IndexTable::MisplacedHash(const IndexCell& cell, uint32_t hash) {
1141 if (!extra_bits_) 1142 if (!extra_bits_)
1142 return false; 1143 return false;
1143 1144
1144 uint32_t mask = (1 << extra_bits_) - 1; 1145 uint32_t mask = (1 << extra_bits_) - 1;
1145 hash = small_table_ ? hash >> kSmallTableHashShift : hash >> kHashShift; 1146 hash = small_table_ ? hash >> kSmallTableHashShift : hash >> kHashShift;
1146 return (GetHashValue(cell) & mask) != (hash & mask); 1147 return (GetHashValue(cell) & mask) != (hash & mask);
1147 } 1148 }
1148 1149
1149 } // namespace disk_cache 1150 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/disk_format_v3.h ('k') | net/filter/brotli_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698