| Index: net/disk_cache/in_flight_backend_io.cc
|
| ===================================================================
|
| --- net/disk_cache/in_flight_backend_io.cc (revision 199883)
|
| +++ net/disk_cache/in_flight_backend_io.cc (working copy)
|
| @@ -287,25 +287,25 @@
|
| void BackendIO::ExecuteEntryOperation() {
|
| switch (operation_) {
|
| case OP_READ:
|
| - result_ = entry_->ReadDataImpl(
|
| - index_, offset_, buf_, buf_len_,
|
| - base::Bind(&BackendIO::OnIOComplete, this));
|
| + result_ =
|
| + entry_->ReadDataImpl(index_, offset_, buf_.get(), buf_len_,
|
| + base::Bind(&BackendIO::OnIOComplete, this));
|
| break;
|
| case OP_WRITE:
|
| - result_ = entry_->WriteDataImpl(
|
| - index_, offset_, buf_, buf_len_,
|
| - base::Bind(&BackendIO::OnIOComplete, this),
|
| - truncate_);
|
| + result_ =
|
| + entry_->WriteDataImpl(index_, offset_, buf_.get(), buf_len_,
|
| + base::Bind(&BackendIO::OnIOComplete, this),
|
| + truncate_);
|
| break;
|
| case OP_READ_SPARSE:
|
| result_ = entry_->ReadSparseDataImpl(
|
| - offset64_, buf_, buf_len_,
|
| - base::Bind(&BackendIO::OnIOComplete, this));
|
| + offset64_, buf_.get(), buf_len_,
|
| + base::Bind(&BackendIO::OnIOComplete, this));
|
| break;
|
| case OP_WRITE_SPARSE:
|
| result_ = entry_->WriteSparseDataImpl(
|
| - offset64_, buf_, buf_len_,
|
| - base::Bind(&BackendIO::OnIOComplete, this));
|
| + offset64_, buf_.get(), buf_len_,
|
| + base::Bind(&BackendIO::OnIOComplete, this));
|
| break;
|
| case OP_GET_RANGE:
|
| result_ = entry_->GetAvailableRangeImpl(offset64_, buf_len_, start_);
|
| @@ -316,7 +316,7 @@
|
| break;
|
| case OP_IS_READY:
|
| result_ = entry_->ReadyForSparseIOImpl(
|
| - base::Bind(&BackendIO::OnIOComplete, this));
|
| + base::Bind(&BackendIO::OnIOComplete, this));
|
| break;
|
| default:
|
| NOTREACHED() << "Invalid Operation";
|
| @@ -340,35 +340,35 @@
|
| void InFlightBackendIO::Init(const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->Init();
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::OpenEntry(const std::string& key, Entry** entry,
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->OpenEntry(key, entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::CreateEntry(const std::string& key, Entry** entry,
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->CreateEntry(key, entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::DoomEntry(const std::string& key,
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->DoomEntry(key);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::DoomAllEntries(
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->DoomAllEntries();
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time,
|
| @@ -376,69 +376,69 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->DoomEntriesBetween(initial_time, end_time);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::DoomEntriesSince(
|
| const base::Time initial_time, const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->DoomEntriesSince(initial_time);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::OpenNextEntry(void** iter, Entry** next_entry,
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->OpenNextEntry(iter, next_entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::OpenPrevEntry(void** iter, Entry** prev_entry,
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->OpenPrevEntry(iter, prev_entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::EndEnumeration(void* iterator) {
|
| scoped_refptr<BackendIO> operation(
|
| new BackendIO(this, backend_, net::CompletionCallback()));
|
| operation->EndEnumeration(iterator);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::OnExternalCacheHit(const std::string& key) {
|
| scoped_refptr<BackendIO> operation(
|
| new BackendIO(this, backend_, net::CompletionCallback()));
|
| operation->OnExternalCacheHit(key);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::CloseEntryImpl(EntryImpl* entry) {
|
| scoped_refptr<BackendIO> operation(
|
| new BackendIO(this, backend_, net::CompletionCallback()));
|
| operation->CloseEntryImpl(entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::DoomEntryImpl(EntryImpl* entry) {
|
| scoped_refptr<BackendIO> operation(
|
| new BackendIO(this, backend_, net::CompletionCallback()));
|
| operation->DoomEntryImpl(entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::FlushQueue(const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->FlushQueue();
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::RunTask(
|
| const base::Closure& task, const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->RunTask(task);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::ReadData(EntryImpl* entry, int index, int offset,
|
| @@ -446,7 +446,7 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->ReadData(entry, index, offset, buf, buf_len);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::WriteData(EntryImpl* entry, int index, int offset,
|
| @@ -455,7 +455,7 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->WriteData(entry, index, offset, buf, buf_len, truncate);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::ReadSparseData(
|
| @@ -463,7 +463,7 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->ReadSparseData(entry, offset, buf, buf_len);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::WriteSparseData(
|
| @@ -471,7 +471,7 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->WriteSparseData(entry, offset, buf, buf_len);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::GetAvailableRange(
|
| @@ -479,21 +479,21 @@
|
| const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->GetAvailableRange(entry, offset, len, start);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::CancelSparseIO(EntryImpl* entry) {
|
| scoped_refptr<BackendIO> operation(
|
| new BackendIO(this, backend_, net::CompletionCallback()));
|
| operation->CancelSparseIO(entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::ReadyForSparseIO(
|
| EntryImpl* entry, const net::CompletionCallback& callback) {
|
| scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
|
| operation->ReadyForSparseIO(entry);
|
| - PostOperation(operation);
|
| + PostOperation(operation.get());
|
| }
|
|
|
| void InFlightBackendIO::WaitForPendingIO() {
|
|
|