Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: net/disk_cache/backend_impl.cc

Issue 8956014: base::Bind: Cleanup almost-unused OldCompletionCallbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/backend_impl.h ('k') | net/disk_cache/disk_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 return net::ERR_IO_PENDING; 1388 return net::ERR_IO_PENDING;
1389 } 1389 }
1390 1390
1391 int BackendImpl::DoomEntry(const std::string& key, 1391 int BackendImpl::DoomEntry(const std::string& key,
1392 OldCompletionCallback* callback) { 1392 OldCompletionCallback* callback) {
1393 DCHECK(callback); 1393 DCHECK(callback);
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) {
1399 DCHECK(callback);
1400 background_queue_.DoomAllEntries(callback);
1401 return net::ERR_IO_PENDING;
1402 }
1403
1404 int BackendImpl::DoomAllEntries(const net::CompletionCallback& callback) { 1398 int BackendImpl::DoomAllEntries(const net::CompletionCallback& callback) {
1405 DCHECK(!callback.is_null()); 1399 DCHECK(!callback.is_null());
1406 background_queue_.DoomAllEntries(callback); 1400 background_queue_.DoomAllEntries(callback);
1407 return net::ERR_IO_PENDING; 1401 return net::ERR_IO_PENDING;
1408 } 1402 }
1409 1403
1410 int BackendImpl::DoomEntriesBetween(const base::Time initial_time, 1404 int BackendImpl::DoomEntriesBetween(const base::Time initial_time,
1411 const base::Time end_time, 1405 const base::Time end_time,
1412 OldCompletionCallback* callback) {
1413 DCHECK(callback);
1414 background_queue_.DoomEntriesBetween(initial_time, end_time, callback);
1415 return net::ERR_IO_PENDING;
1416 }
1417
1418 int BackendImpl::DoomEntriesBetween(const base::Time initial_time,
1419 const base::Time end_time,
1420 const net::CompletionCallback& callback) { 1406 const net::CompletionCallback& callback) {
1421 DCHECK(!callback.is_null()); 1407 DCHECK(!callback.is_null());
1422 background_queue_.DoomEntriesBetween(initial_time, end_time, callback); 1408 background_queue_.DoomEntriesBetween(initial_time, end_time, callback);
1423 return net::ERR_IO_PENDING; 1409 return net::ERR_IO_PENDING;
1424 } 1410 }
1425 1411
1426 int BackendImpl::DoomEntriesSince(const base::Time initial_time, 1412 int BackendImpl::DoomEntriesSince(const base::Time initial_time,
1427 OldCompletionCallback* callback) { 1413 OldCompletionCallback* callback) {
1428 DCHECK(callback); 1414 DCHECK(callback);
1429 background_queue_.DoomEntriesSince(initial_time, callback); 1415 background_queue_.DoomEntriesSince(initial_time, callback);
1430 return net::ERR_IO_PENDING; 1416 return net::ERR_IO_PENDING;
1431 } 1417 }
1432 1418
1433 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry, 1419 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
1434 OldCompletionCallback* callback) {
1435 DCHECK(callback);
1436 background_queue_.OpenNextEntry(iter, next_entry, callback);
1437 return net::ERR_IO_PENDING;
1438 }
1439
1440 int BackendImpl::OpenNextEntry(void** iter, Entry** next_entry,
1441 const net::CompletionCallback& callback) { 1420 const net::CompletionCallback& callback) {
1442 DCHECK(!callback.is_null()); 1421 DCHECK(!callback.is_null());
1443 background_queue_.OpenNextEntry(iter, next_entry, callback); 1422 background_queue_.OpenNextEntry(iter, next_entry, callback);
1444 return net::ERR_IO_PENDING; 1423 return net::ERR_IO_PENDING;
1445 } 1424 }
1446 1425
1447 void BackendImpl::EndEnumeration(void** iter) { 1426 void BackendImpl::EndEnumeration(void** iter) {
1448 background_queue_.EndEnumeration(*iter); 1427 background_queue_.EndEnumeration(*iter);
1449 *iter = NULL; 1428 *iter = NULL;
1450 } 1429 }
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 if (total_memory > kMaxBuffersSize || total_memory <= 0) 2234 if (total_memory > kMaxBuffersSize || total_memory <= 0)
2256 total_memory = kMaxBuffersSize; 2235 total_memory = kMaxBuffersSize;
2257 2236
2258 done = true; 2237 done = true;
2259 } 2238 }
2260 2239
2261 return static_cast<int>(total_memory); 2240 return static_cast<int>(total_memory);
2262 } 2241 }
2263 2242
2264 } // namespace disk_cache 2243 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/backend_impl.h ('k') | net/disk_cache/disk_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698