| Index: net/disk_cache/in_flight_backend_io.cc
|
| diff --git a/net/disk_cache/in_flight_backend_io.cc b/net/disk_cache/in_flight_backend_io.cc
|
| index 5d4be1890a69a758a077d577f61f7cbc4add2f4e..773dbeef595b39be70b4af0e14b3ed879de7f2de 100644
|
| --- a/net/disk_cache/in_flight_backend_io.cc
|
| +++ b/net/disk_cache/in_flight_backend_io.cc
|
| @@ -182,6 +182,11 @@ void BackendIO::ReadyForSparseIO(EntryImpl* entry) {
|
| entry_ = entry;
|
| }
|
|
|
| +void BackendIO::UpdateRankForExternalCacheHit(EntryImpl* entry) {
|
| + operation_ = OP_UPDATE_RANK;
|
| + entry_ = entry;
|
| +}
|
| +
|
| BackendIO::~BackendIO() {}
|
|
|
| // Runs on the background thread.
|
| @@ -271,6 +276,10 @@ void BackendIO::ExecuteEntryOperation() {
|
| case OP_IS_READY:
|
| result_ = entry_->ReadyForSparseIOImpl(&my_callback_);
|
| break;
|
| + case OP_UPDATE_RANK:
|
| + entry_->UpdateRankForExternalCacheHitImpl();
|
| + result_ = net::OK;
|
| + break;
|
| default:
|
| NOTREACHED() << "Invalid Operation";
|
| result_ = net::ERR_UNEXPECTED;
|
| @@ -436,6 +445,12 @@ void InFlightBackendIO::ReadyForSparseIO(EntryImpl* entry,
|
| PostOperation(operation);
|
| }
|
|
|
| +void InFlightBackendIO::UpdateRankForExternalCacheHit(EntryImpl* entry) {
|
| + scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, NULL));
|
| + operation->UpdateRankForExternalCacheHit(entry);
|
| + PostOperation(operation);
|
| +}
|
| +
|
| void InFlightBackendIO::WaitForPendingIO() {
|
| InFlightIO::WaitForPendingIO();
|
| }
|
|
|