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

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: erase Closure* 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 c08242884054a6cf783e27c7ce5b332b3f6cb010..769954e40b863245be8a0c5f5c4968e33b938c36 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -933,11 +933,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() {
« no previous file with comments | « components/history/core/browser/history_service.h ('k') | components/memory_pressure/memory_pressure_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698