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

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

Issue 2678303002: Pass Callback by value on PostTaskAndReply family (Closed)
Patch Set: #include 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
« ios/web/web_thread_impl.cc ('K') | « 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 489d7177017e892828cf3deb89f739c1b30d9d37..e7f27f04fdcac24ecb6517335c86ddad72661dcf 100644
--- a/storage/browser/quota/quota_manager.cc
+++ b/storage/browser/quota/quota_manager.cc
@@ -1812,16 +1812,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
« ios/web/web_thread_impl.cc ('K') | « storage/browser/quota/quota_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698