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

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

Issue 8798001: base::Bind: Convert browsing_data_remover. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/in_flight_backend_io.h ('k') | net/disk_cache/mem_backend_impl.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/in_flight_backend_io.h" 5 #include "net/disk_cache/in_flight_backend_io.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 operation->DoomEntry(key); 354 operation->DoomEntry(key);
355 PostOperation(operation); 355 PostOperation(operation);
356 } 356 }
357 357
358 void InFlightBackendIO::DoomAllEntries(OldCompletionCallback* callback) { 358 void InFlightBackendIO::DoomAllEntries(OldCompletionCallback* callback) {
359 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 359 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
360 operation->DoomAllEntries(); 360 operation->DoomAllEntries();
361 PostOperation(operation); 361 PostOperation(operation);
362 } 362 }
363 363
364 void InFlightBackendIO::DoomAllEntries(
365 const net::CompletionCallback& callback) {
366 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
367 operation->DoomAllEntries();
368 PostOperation(operation);
369 }
370
364 void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time, 371 void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time,
365 const base::Time end_time, 372 const base::Time end_time,
366 OldCompletionCallback* callback) { 373 OldCompletionCallback* callback) {
367 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 374 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
368 operation->DoomEntriesBetween(initial_time, end_time); 375 operation->DoomEntriesBetween(initial_time, end_time);
369 PostOperation(operation); 376 PostOperation(operation);
370 } 377 }
371 378
379 void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time,
380 const base::Time end_time,
381 const net::CompletionCallback& callback) {
382 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
383 operation->DoomEntriesBetween(initial_time, end_time);
384 PostOperation(operation);
385 }
386
372 void InFlightBackendIO::DoomEntriesSince(const base::Time initial_time, 387 void InFlightBackendIO::DoomEntriesSince(const base::Time initial_time,
373 OldCompletionCallback* callback) { 388 OldCompletionCallback* callback) {
374 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 389 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
375 operation->DoomEntriesSince(initial_time); 390 operation->DoomEntriesSince(initial_time);
376 PostOperation(operation); 391 PostOperation(operation);
377 } 392 }
378 393
379 void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry, 394 void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry,
380 OldCompletionCallback* callback) { 395 OldCompletionCallback* callback) {
381 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 396 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 op->callback().Run(op->result()); 530 op->callback().Run(op->result());
516 } 531 }
517 532
518 void InFlightBackendIO::PostOperation(BackendIO* operation) { 533 void InFlightBackendIO::PostOperation(BackendIO* operation) {
519 background_thread_->PostTask(FROM_HERE, 534 background_thread_->PostTask(FROM_HERE,
520 base::Bind(&BackendIO::ExecuteOperation, operation)); 535 base::Bind(&BackendIO::ExecuteOperation, operation));
521 OnOperationPosted(operation); 536 OnOperationPosted(operation);
522 } 537 }
523 538
524 } // namespace 539 } // namespace
OLDNEW
« no previous file with comments | « net/disk_cache/in_flight_backend_io.h ('k') | net/disk_cache/mem_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698