OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/bitmap.h" | 5 #include "net/disk_cache/blockfile/bitmap.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // Returns the number of trailing zeros. | 13 // Returns the number of trailing zeros. |
14 int FindLSBSetNonZero(uint32 word) { | 14 int FindLSBSetNonZero(uint32 word) { |
15 // Get the LSB, put it on the exponent of a 32 bit float and remove the | 15 // Get the LSB, put it on the exponent of a 32 bit float and remove the |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 uint32 to_add = 0xffffffff << len; | 302 uint32 to_add = 0xffffffff << len; |
303 to_add = (~to_add) << offset; | 303 to_add = (~to_add) << offset; |
304 if (value) { | 304 if (value) { |
305 map_[word] |= to_add; | 305 map_[word] |= to_add; |
306 } else { | 306 } else { |
307 map_[word] &= ~to_add; | 307 map_[word] &= ~to_add; |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 } // namespace disk_cache | 311 } // namespace disk_cache |
OLD | NEW |