OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/entry_impl.h" | 5 #include "net/disk_cache/blockfile/entry_impl.h" |
6 | 6 |
7 #include "base/hash.h" | 7 #include "base/hash.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/disk_cache/backend_impl.h" | 13 #include "net/disk_cache/blockfile/backend_impl.h" |
14 #include "net/disk_cache/bitmap.h" | 14 #include "net/disk_cache/blockfile/bitmap.h" |
| 15 #include "net/disk_cache/blockfile/disk_format.h" |
| 16 #include "net/disk_cache/blockfile/sparse_control.h" |
15 #include "net/disk_cache/cache_util.h" | 17 #include "net/disk_cache/cache_util.h" |
16 #include "net/disk_cache/disk_format.h" | |
17 #include "net/disk_cache/net_log_parameters.h" | 18 #include "net/disk_cache/net_log_parameters.h" |
18 #include "net/disk_cache/sparse_control.h" | |
19 | 19 |
20 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order | 20 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order |
21 // to use the CACHE_UMA histogram macro. | 21 // to use the CACHE_UMA histogram macro. |
22 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_ | 22 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_ |
23 #include "net/disk_cache/histogram_macros.h" | 23 #include "net/disk_cache/blockfile/histogram_macros.h" |
24 | 24 |
25 using base::Time; | 25 using base::Time; |
26 using base::TimeDelta; | 26 using base::TimeDelta; |
27 using base::TimeTicks; | 27 using base::TimeTicks; |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Index for the file used to store the key, if any (files_[kKeyFileIndex]). | 31 // Index for the file used to store the key, if any (files_[kKeyFileIndex]). |
32 const int kKeyFileIndex = 3; | 32 const int kKeyFileIndex = 3; |
33 | 33 |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), | 1545 Trace("%s 0x%p 0x%x 0x%x", msg, reinterpret_cast<void*>(this), |
1546 entry_.address().value(), node_.address().value()); | 1546 entry_.address().value(), node_.address().value()); |
1547 | 1547 |
1548 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], | 1548 Trace(" data: 0x%x 0x%x 0x%x", entry_.Data()->data_addr[0], |
1549 entry_.Data()->data_addr[1], entry_.Data()->long_key); | 1549 entry_.Data()->data_addr[1], entry_.Data()->long_key); |
1550 | 1550 |
1551 Trace(" doomed: %d 0x%x", doomed_, dirty); | 1551 Trace(" doomed: %d 0x%x", doomed_, dirty); |
1552 } | 1552 } |
1553 | 1553 |
1554 } // namespace disk_cache | 1554 } // namespace disk_cache |
OLD | NEW |