OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/backend_impl.h" | 5 #include "net/disk_cache/backend_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 return net::ERR_IO_PENDING; | 1430 return net::ERR_IO_PENDING; |
1431 } | 1431 } |
1432 | 1432 |
1433 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, | 1433 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, |
1434 OldCompletionCallback* callback) { | 1434 OldCompletionCallback* callback) { |
1435 DCHECK(callback); | 1435 DCHECK(callback); |
1436 background_queue_.OpenNextEntry(iter, next_entry, callback); | 1436 background_queue_.OpenNextEntry(iter, next_entry, callback); |
1437 return net::ERR_IO_PENDING; | 1437 return net::ERR_IO_PENDING; |
1438 } | 1438 } |
1439 | 1439 |
| 1440 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, |
| 1441 const net::CompletionCallback& callback) { |
| 1442 DCHECK(!callback.is_null()); |
| 1443 background_queue_.OpenNextEntry(iter, next_entry, callback); |
| 1444 return net::ERR_IO_PENDING; |
| 1445 } |
| 1446 |
1440 void BackendImpl::EndEnumeration(void** iter) { | 1447 void BackendImpl::EndEnumeration(void** iter) { |
1441 background_queue_.EndEnumeration(*iter); | 1448 background_queue_.EndEnumeration(*iter); |
1442 *iter = NULL; | 1449 *iter = NULL; |
1443 } | 1450 } |
1444 | 1451 |
1445 void BackendImpl::GetStats(StatsItems* stats) { | 1452 void BackendImpl::GetStats(StatsItems* stats) { |
1446 if (disabled_) | 1453 if (disabled_) |
1447 return; | 1454 return; |
1448 | 1455 |
1449 std::pair<std::string, std::string> item; | 1456 std::pair<std::string, std::string> item; |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 if (total_memory > kMaxBuffersSize || total_memory <= 0) | 2255 if (total_memory > kMaxBuffersSize || total_memory <= 0) |
2249 total_memory = kMaxBuffersSize; | 2256 total_memory = kMaxBuffersSize; |
2250 | 2257 |
2251 done = true; | 2258 done = true; |
2252 } | 2259 } |
2253 | 2260 |
2254 return static_cast<int>(total_memory); | 2261 return static_cast<int>(total_memory); |
2255 } | 2262 } |
2256 | 2263 |
2257 } // namespace disk_cache | 2264 } // namespace disk_cache |
OLD | NEW |