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/sparse_control.h" | 5 #include "net/disk_cache/blockfile/sparse_control.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/disk_cache/backend_impl.h" | 16 #include "net/disk_cache/blockfile/backend_impl.h" |
17 #include "net/disk_cache/entry_impl.h" | 17 #include "net/disk_cache/blockfile/entry_impl.h" |
18 #include "net/disk_cache/file.h" | 18 #include "net/disk_cache/blockfile/file.h" |
19 #include "net/disk_cache/net_log_parameters.h" | 19 #include "net/disk_cache/net_log_parameters.h" |
20 | 20 |
21 using base::Time; | 21 using base::Time; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Stream of the sparse data index. | 25 // Stream of the sparse data index. |
26 const int kSparseIndex = 2; | 26 const int kSparseIndex = 2; |
27 | 27 |
28 // Stream of the sparse data. | 28 // Stream of the sparse data. |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 CompletionCallback cb = abort_callbacks_[i]; | 877 CompletionCallback cb = abort_callbacks_[i]; |
878 if (i == abort_callbacks_.size() - 1) | 878 if (i == abort_callbacks_.size() - 1) |
879 abort_callbacks_.clear(); | 879 abort_callbacks_.clear(); |
880 | 880 |
881 entry_->Release(); // Don't touch object after this line. | 881 entry_->Release(); // Don't touch object after this line. |
882 cb.Run(net::OK); | 882 cb.Run(net::OK); |
883 } | 883 } |
884 } | 884 } |
885 | 885 |
886 } // namespace disk_cache | 886 } // namespace disk_cache |
OLD | NEW |