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

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

Issue 8897026: Reland r113263 rebased after revert of r113249. (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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 PostOperation(operation); 377 PostOperation(operation);
378 } 378 }
379 379
380 void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry, 380 void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry,
381 OldCompletionCallback* callback) { 381 OldCompletionCallback* callback) {
382 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 382 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
383 operation->OpenNextEntry(iter, next_entry); 383 operation->OpenNextEntry(iter, next_entry);
384 PostOperation(operation); 384 PostOperation(operation);
385 } 385 }
386 386
387 void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry,
388 const net::CompletionCallback& callback) {
389 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
390 operation->OpenNextEntry(iter, next_entry);
391 PostOperation(operation);
392 }
393
387 void InFlightBackendIO::OpenPrevEntry(void** iter, Entry** prev_entry, 394 void InFlightBackendIO::OpenPrevEntry(void** iter, Entry** prev_entry,
388 OldCompletionCallback* callback) { 395 OldCompletionCallback* callback) {
389 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); 396 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
390 operation->OpenPrevEntry(iter, prev_entry); 397 operation->OpenPrevEntry(iter, prev_entry);
391 PostOperation(operation); 398 PostOperation(operation);
392 } 399 }
393 400
394 void InFlightBackendIO::EndEnumeration(void* iterator) { 401 void InFlightBackendIO::EndEnumeration(void* iterator) {
395 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, NULL)); 402 scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, NULL));
396 operation->EndEnumeration(iterator); 403 operation->EndEnumeration(iterator);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 op->callback().Run(op->result()); 506 op->callback().Run(op->result());
500 } 507 }
501 508
502 void InFlightBackendIO::PostOperation(BackendIO* operation) { 509 void InFlightBackendIO::PostOperation(BackendIO* operation) {
503 background_thread_->PostTask(FROM_HERE, 510 background_thread_->PostTask(FROM_HERE,
504 base::Bind(&BackendIO::ExecuteOperation, operation)); 511 base::Bind(&BackendIO::ExecuteOperation, operation));
505 OnOperationPosted(operation); 512 OnOperationPosted(operation);
506 } 513 }
507 514
508 } // namespace 515 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698