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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.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_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index dad6a34294ebad019cefefc15218460ab9b6b863..fb4f1dfadfae44033fda7718779e7d3d630bc74e 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -157,8 +157,9 @@ void IndexedDBDispatcherHost::RenderProcessExited(
int exit_code) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&IndexedDBDispatcherHost::InvalidateWeakPtrsAndClearBindings,
- base::Unretained(this)));
+ base::BindOnce(
+ &IndexedDBDispatcherHost::InvalidateWeakPtrsAndClearBindings,
+ base::Unretained(this)));
}
void IndexedDBDispatcherHost::GetDatabaseNames(
@@ -174,9 +175,9 @@ void IndexedDBDispatcherHost::GetDatabaseNames(
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
this->AsWeakPtr(), origin, std::move(callbacks_info), idb_runner_));
idb_runner_->PostTask(
- FROM_HERE, base::Bind(&IDBSequenceHelper::GetDatabaseNamesOnIDBThread,
- base::Unretained(idb_helper_),
- base::Passed(&callbacks), origin));
+ FROM_HERE, base::BindOnce(&IDBSequenceHelper::GetDatabaseNamesOnIDBThread,
+ base::Unretained(idb_helper_),
+ base::Passed(&callbacks), origin));
}
void IndexedDBDispatcherHost::Open(
@@ -201,10 +202,10 @@ void IndexedDBDispatcherHost::Open(
std::move(database_callbacks_info)));
idb_runner_->PostTask(
FROM_HERE,
- base::Bind(&IDBSequenceHelper::OpenOnIDBThread,
- base::Unretained(idb_helper_), base::Passed(&callbacks),
- base::Passed(&database_callbacks), origin, name, version,
- transaction_id));
+ base::BindOnce(&IDBSequenceHelper::OpenOnIDBThread,
+ base::Unretained(idb_helper_), base::Passed(&callbacks),
+ base::Passed(&database_callbacks), origin, name, version,
+ transaction_id));
}
void IndexedDBDispatcherHost::DeleteDatabase(
@@ -223,9 +224,9 @@ void IndexedDBDispatcherHost::DeleteDatabase(
this->AsWeakPtr(), origin, std::move(callbacks_info), idb_runner_));
idb_runner_->PostTask(
FROM_HERE,
- base::Bind(&IDBSequenceHelper::DeleteDatabaseOnIDBThread,
- base::Unretained(idb_helper_), base::Passed(&callbacks),
- origin, name, force_close));
+ base::BindOnce(&IDBSequenceHelper::DeleteDatabaseOnIDBThread,
+ base::Unretained(idb_helper_), base::Passed(&callbacks),
+ origin, name, force_close));
}
void IndexedDBDispatcherHost::InvalidateWeakPtrsAndClearBindings() {
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_unittest.cc ('k') | content/browser/indexed_db/indexed_db_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698