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

Unified Diff: components/history/core/browser/history_service.cc

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: rebase Created 3 years, 9 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: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index b154b3237e19b1373d1c0ba522aefc8229a51861..086887785b26fd92204dbde9888f3e74c9aa41b5 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -919,11 +919,11 @@ void HistoryService::ScheduleAutocomplete(
}
void HistoryService::ScheduleTask(SchedulePriority priority,
- const base::Closure& task) {
+ base::Closure task) {
DCHECK(thread_checker_.CalledOnValidThread());
CHECK(backend_task_runner_);
// TODO(brettw): Do prioritization.
- backend_task_runner_->PostTask(FROM_HERE, task);
+ backend_task_runner_->PostTask(FROM_HERE, std::move(task));
}
base::WeakPtr<HistoryService> HistoryService::AsWeakPtr() {

Powered by Google App Engine
This is Rietveld 408576698