| 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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 background_queue_.DoomEntry(key, callback); | 1394 background_queue_.DoomEntry(key, callback); |
| 1395 return net::ERR_IO_PENDING; | 1395 return net::ERR_IO_PENDING; |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 int BackendImpl::DoomAllEntries(OldCompletionCallback* callback) { | 1398 int BackendImpl::DoomAllEntries(OldCompletionCallback* callback) { |
| 1399 DCHECK(callback); | 1399 DCHECK(callback); |
| 1400 background_queue_.DoomAllEntries(callback); | 1400 background_queue_.DoomAllEntries(callback); |
| 1401 return net::ERR_IO_PENDING; | 1401 return net::ERR_IO_PENDING; |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 int BackendImpl::DoomAllEntries(const net::CompletionCallback& callback) { |
| 1405 DCHECK(!callback.is_null()); |
| 1406 background_queue_.DoomAllEntries(callback); |
| 1407 return net::ERR_IO_PENDING; |
| 1408 } |
| 1409 |
| 1404 int BackendImpl::DoomEntriesBetween(const base::Time initial_time, | 1410 int BackendImpl::DoomEntriesBetween(const base::Time initial_time, |
| 1405 const base::Time end_time, | 1411 const base::Time end_time, |
| 1406 OldCompletionCallback* callback) { | 1412 OldCompletionCallback* callback) { |
| 1407 DCHECK(callback); | 1413 DCHECK(callback); |
| 1408 background_queue_.DoomEntriesBetween(initial_time, end_time, callback); | 1414 background_queue_.DoomEntriesBetween(initial_time, end_time, callback); |
| 1409 return net::ERR_IO_PENDING; | 1415 return net::ERR_IO_PENDING; |
| 1410 } | 1416 } |
| 1411 | 1417 |
| 1418 int BackendImpl::DoomEntriesBetween(const base::Time initial_time, |
| 1419 const base::Time end_time, |
| 1420 const net::CompletionCallback& callback) { |
| 1421 DCHECK(!callback.is_null()); |
| 1422 background_queue_.DoomEntriesBetween(initial_time, end_time, callback); |
| 1423 return net::ERR_IO_PENDING; |
| 1424 } |
| 1425 |
| 1412 int BackendImpl::DoomEntriesSince(const base::Time initial_time, | 1426 int BackendImpl::DoomEntriesSince(const base::Time initial_time, |
| 1413 OldCompletionCallback* callback) { | 1427 OldCompletionCallback* callback) { |
| 1414 DCHECK(callback); | 1428 DCHECK(callback); |
| 1415 background_queue_.DoomEntriesSince(initial_time, callback); | 1429 background_queue_.DoomEntriesSince(initial_time, callback); |
| 1416 return net::ERR_IO_PENDING; | 1430 return net::ERR_IO_PENDING; |
| 1417 } | 1431 } |
| 1418 | 1432 |
| 1419 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, | 1433 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, |
| 1420 OldCompletionCallback* callback) { | 1434 OldCompletionCallback* callback) { |
| 1421 DCHECK(callback); | 1435 DCHECK(callback); |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2234 if (total_memory > kMaxBuffersSize || total_memory <= 0) | 2248 if (total_memory > kMaxBuffersSize || total_memory <= 0) |
| 2235 total_memory = kMaxBuffersSize; | 2249 total_memory = kMaxBuffersSize; |
| 2236 | 2250 |
| 2237 done = true; | 2251 done = true; |
| 2238 } | 2252 } |
| 2239 | 2253 |
| 2240 return static_cast<int>(total_memory); | 2254 return static_cast<int>(total_memory); |
| 2241 } | 2255 } |
| 2242 | 2256 |
| 2243 } // namespace disk_cache | 2257 } // namespace disk_cache |
| OLD | NEW |