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/blockfile/sparse_control.h" | 5 #include "net/disk_cache/blockfile/sparse_control.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 case disk_cache::SparseControl::kGetRangeOperation: | 158 case disk_cache::SparseControl::kGetRangeOperation: |
159 return net::NetLogEventType::SPARSE_GET_RANGE; | 159 return net::NetLogEventType::SPARSE_GET_RANGE; |
160 default: | 160 default: |
161 NOTREACHED(); | 161 NOTREACHED(); |
162 return net::NetLogEventType::CANCELLED; | 162 return net::NetLogEventType::CANCELLED; |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 // Logs the end event for |operation| on a child entry. Range operations log | 166 // Logs the end event for |operation| on a child entry. Range operations log |
167 // no events for each child they search through. | 167 // no events for each child they search through. |
168 void LogChildOperationEnd(const net::BoundNetLog& net_log, | 168 void LogChildOperationEnd(const net::NetLogWithSource& net_log, |
169 disk_cache::SparseControl::SparseOperation operation, | 169 disk_cache::SparseControl::SparseOperation operation, |
170 int result) { | 170 int result) { |
171 if (net_log.IsCapturing()) { | 171 if (net_log.IsCapturing()) { |
172 net::NetLogEventType event_type; | 172 net::NetLogEventType event_type; |
173 switch (operation) { | 173 switch (operation) { |
174 case disk_cache::SparseControl::kReadOperation: | 174 case disk_cache::SparseControl::kReadOperation: |
175 event_type = net::NetLogEventType::SPARSE_READ_CHILD_DATA; | 175 event_type = net::NetLogEventType::SPARSE_READ_CHILD_DATA; |
176 break; | 176 break; |
177 case disk_cache::SparseControl::kWriteOperation: | 177 case disk_cache::SparseControl::kWriteOperation: |
178 event_type = net::NetLogEventType::SPARSE_WRITE_CHILD_DATA; | 178 event_type = net::NetLogEventType::SPARSE_WRITE_CHILD_DATA; |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 CompletionCallback cb = abort_callbacks_[i]; | 902 CompletionCallback cb = abort_callbacks_[i]; |
903 if (i == abort_callbacks_.size() - 1) | 903 if (i == abort_callbacks_.size() - 1) |
904 abort_callbacks_.clear(); | 904 abort_callbacks_.clear(); |
905 | 905 |
906 entry_->Release(); // Don't touch object after this line. | 906 entry_->Release(); // Don't touch object after this line. |
907 cb.Run(net::OK); | 907 cb.Run(net::OK); |
908 } | 908 } |
909 } | 909 } |
910 | 910 |
911 } // namespace disk_cache | 911 } // namespace disk_cache |
OLD | NEW |