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

Unified Diff: components/subresource_filter/content/browser/content_ruleset_service_unittest.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/subresource_filter/content/browser/content_ruleset_service_unittest.cc
diff --git a/components/subresource_filter/content/browser/content_ruleset_service_unittest.cc b/components/subresource_filter/content/browser/content_ruleset_service_unittest.cc
index 8f53bf91021ab9b0116dd64992bc8b8673355c35..b7914875dce61a1bfb829f4509d82772ae0f1dd4 100644
--- a/components/subresource_filter/content/browser/content_ruleset_service_unittest.cc
+++ b/components/subresource_filter/content/browser/content_ruleset_service_unittest.cc
@@ -48,17 +48,17 @@ class TestContentBrowserClient : public ::content::ContentBrowserClient {
// ::content::ContentBrowserClient:
void PostAfterStartupTask(const tracked_objects::Location&,
const scoped_refptr<base::TaskRunner>& task_runner,
- const base::Closure& task) override {
+ base::Closure task) override {
scoped_refptr<base::TaskRunner> ui_task_runner =
content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::UI);
EXPECT_EQ(ui_task_runner, task_runner);
- last_task_ = task;
+ last_task_ = std::move(task);
}
void RunAfterStartupTask() {
if (!last_task_.is_null())
- last_task_.Run();
+ std::move(last_task_).Run();
}
private:
« no previous file with comments | « components/memory_pressure/memory_pressure_monitor_unittest.cc ('k') | components/user_manager/fake_user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698