OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/simple/simple_synchronous_entry.h" | 5 #include "net/disk_cache/simple/simple_synchronous_entry.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <functional> | 9 #include <functional> |
10 #include <limits> | 10 #include <limits> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/hash.h" | 14 #include "base/hash.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/metrics/histogram_macros.h" | 16 #include "base/metrics/histogram_macros.h" |
17 #include "base/numerics/safe_conversions.h" | 17 #include "base/numerics/safe_conversions.h" |
18 #include "base/sha1.h" | 18 #include "base/sha1.h" |
19 #include "base/strings/stringprintf.h" | |
20 #include "base/timer/elapsed_timer.h" | 19 #include "base/timer/elapsed_timer.h" |
21 #include "crypto/secure_hash.h" | 20 #include "crypto/secure_hash.h" |
22 #include "net/base/hash_value.h" | 21 #include "net/base/hash_value.h" |
23 #include "net/base/io_buffer.h" | 22 #include "net/base/io_buffer.h" |
24 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
25 #include "net/disk_cache/simple/simple_backend_version.h" | 24 #include "net/disk_cache/simple/simple_backend_version.h" |
26 #include "net/disk_cache/simple/simple_histogram_macros.h" | 25 #include "net/disk_cache/simple/simple_histogram_macros.h" |
27 #include "net/disk_cache/simple/simple_util.h" | 26 #include "net/disk_cache/simple/simple_util.h" |
28 #include "third_party/zlib/zlib.h" | 27 #include "third_party/zlib/zlib.h" |
29 | 28 |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 range.offset = offset; | 1592 range.offset = offset; |
1594 range.length = len; | 1593 range.length = len; |
1595 range.data_crc32 = data_crc32; | 1594 range.data_crc32 = data_crc32; |
1596 range.file_offset = data_file_offset; | 1595 range.file_offset = data_file_offset; |
1597 sparse_ranges_.insert(std::make_pair(offset, range)); | 1596 sparse_ranges_.insert(std::make_pair(offset, range)); |
1598 | 1597 |
1599 return true; | 1598 return true; |
1600 } | 1599 } |
1601 | 1600 |
1602 } // namespace disk_cache | 1601 } // namespace disk_cache |
OLD | NEW |