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

Unified Diff: content/browser/indexed_db/indexed_db_cursor.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_cursor.cc
diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc
index c84547fb43f98c38b70046113b1b54b51bece98c..979a8b16fe0fd4abe92b17f8b7e0471828c19301 100644
--- a/content/browser/indexed_db/indexed_db_cursor.cc
+++ b/content/browser/indexed_db/indexed_db_cursor.cc
@@ -34,7 +34,7 @@ leveldb::Status InvokeOrSucceed(base::WeakPtr<IndexedDBCursor> weak_cursor,
IndexedDBTransaction::Operation operation,
IndexedDBTransaction* transaction) {
if (weak_cursor)
- return operation.Run(transaction);
+ return std::move(operation).Run(transaction);
return leveldb::Status::OK();
}
@@ -47,10 +47,10 @@ IndexedDBTransaction::Operation BindWeakOperation(
Args&&... args) {
DCHECK(weak_cursor);
IndexedDBCursor* cursor_ptr = weak_cursor.get();
- return base::Bind(
- &InvokeOrSucceed, std::move(weak_cursor),
- base::Bind(std::forward<Functor>(functor), base::Unretained(cursor_ptr),
- std::forward<Args>(args)...));
+ return base::BindOnce(&InvokeOrSucceed, std::move(weak_cursor),
+ base::BindOnce(std::forward<Functor>(functor),
+ base::Unretained(cursor_ptr),
+ std::forward<Args>(args)...));
}
} // namespace
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698