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

Unified Diff: storage/browser/quota/quota_manager.cc

Issue 2678303002: Pass Callback by value on PostTaskAndReply family (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « storage/browser/quota/quota_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/quota/quota_manager.cc
diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc
index 0c536bcf8b8f48424a6b4a480ba84364d8356b4c..b9452e44db79f362a9e87023c10f0dfc0006a93e 100644
--- a/storage/browser/quota/quota_manager.cc
+++ b/storage/browser/quota/quota_manager.cc
@@ -1638,16 +1638,15 @@ void QuotaManager::DeleteOnCorrectThread() const {
void QuotaManager::PostTaskAndReplyWithResultForDBThread(
const tracked_objects::Location& from_here,
- const base::Callback<bool(QuotaDatabase*)>& task,
- const base::Callback<void(bool)>& reply) {
+ base::Callback<bool(QuotaDatabase*)> task,
+ base::Callback<void(bool)> reply) {
// Deleting manager will post another task to DB thread to delete
// |database_|, therefore we can be sure that database_ is alive when this
// task runs.
base::PostTaskAndReplyWithResult(
- db_thread_.get(),
- from_here,
- base::Bind(task, base::Unretained(database_.get())),
- reply);
+ db_thread_.get(), from_here,
+ base::Bind(std::move(task), base::Unretained(database_.get())),
+ std::move(reply));
}
// static
« no previous file with comments | « storage/browser/quota/quota_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698