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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 2941353002: Indexed DB: Use BindOnce / OnceCallback / OnceClosure where applicable (Closed)
Patch Set: Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index c5ecee8d36f187ca883bfc7178eff212534fc043..83b49ff670d1a0fbe7a5363c4298410de083eb4a 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -2424,7 +2424,7 @@ class IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl
blobs_.swap(*blobs);
iter_ = blobs_.begin();
backing_store->task_runner()->PostTask(
- FROM_HERE, base::Bind(&ChainedBlobWriterImpl::WriteNextFile, this));
+ FROM_HERE, base::BindOnce(&ChainedBlobWriterImpl::WriteNextFile, this));
}
void set_delegate(std::unique_ptr<FileWriterDelegate> delegate) override {
@@ -2526,18 +2526,16 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
// LocalFileStreamWriter only creates a file if data is actually written.
// If none was then create one now.
task_runner_->PostTask(
- FROM_HERE, base::Bind(&LocalWriteClosure::CreateEmptyFile, this));
+ FROM_HERE, base::BindOnce(&LocalWriteClosure::CreateEmptyFile, this));
} else if (success && !last_modified_.is_null()) {
task_runner_->PostTask(
- FROM_HERE, base::Bind(&LocalWriteClosure::UpdateTimeStamp, this));
+ FROM_HERE, base::BindOnce(&LocalWriteClosure::UpdateTimeStamp, this));
} else {
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&IndexedDBBackingStore::Transaction::ChainedBlobWriter::
- ReportWriteCompletion,
- chained_blob_writer_,
- success,
- bytes_written_));
+ base::BindOnce(&IndexedDBBackingStore::Transaction::
+ ChainedBlobWriter::ReportWriteCompletion,
+ chained_blob_writer_, success, bytes_written_));
}
}
@@ -2677,19 +2675,17 @@ bool IndexedDBBackingStore::WriteBlobFile(
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&Transaction::ChainedBlobWriter::ReportWriteCompletion,
- chained_blob_writer,
- true,
- info.size));
+ base::BindOnce(&Transaction::ChainedBlobWriter::ReportWriteCompletion,
+ chained_blob_writer, true, info.size));
} else {
DCHECK(descriptor.url().is_valid());
scoped_refptr<LocalWriteClosure> write_closure(
new LocalWriteClosure(chained_blob_writer, task_runner_.get()));
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
- base::Bind(&LocalWriteClosure::WriteBlobToFileOnIOThread,
- write_closure, path, descriptor.url(),
- descriptor.last_modified(), request_context_getter_));
+ base::BindOnce(&LocalWriteClosure::WriteBlobToFileOnIOThread,
+ write_closure, path, descriptor.url(),
+ descriptor.last_modified(), request_context_getter_));
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698