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

Unified Diff: chrome/browser/memory/tab_manager_unittest.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 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: chrome/browser/memory/tab_manager_unittest.cc
diff --git a/chrome/browser/memory/tab_manager_unittest.cc b/chrome/browser/memory/tab_manager_unittest.cc
index 0129a78edaaae0ddc0b58b68a31fc54fb13a40aa..c62a285b53a5cd051ea15ee4e559b6a1060320a8 100644
--- a/chrome/browser/memory/tab_manager_unittest.cc
+++ b/chrome/browser/memory/tab_manager_unittest.cc
@@ -100,7 +100,7 @@ class LenientMockTaskRunner {
using MockTaskRunner = testing::StrictMock<LenientMockTaskRunner>;
// Represents a pending task.
-using Task = std::pair<base::TimeTicks, base::Closure>;
+using Task = std::pair<base::TimeTicks, base::OnceClosure>;
// Comparator used for sorting Task objects. Can't use std::pair's default
// comparison operators because Closure's are comparable.
@@ -120,7 +120,7 @@ class TaskRunnerProxy : public base::TaskRunner {
: mock_(mock), clock_(clock) {}
bool RunsTasksOnCurrentThread() const override { return true; }
bool PostDelayedTask(const tracked_objects::Location& location,
- base::Closure closure,
+ base::OnceClosure closure,
base::TimeDelta delta) override {
mock_->PostDelayedTask(location, delta);
base::TimeTicks when = clock_->NowTicks() + delta;
@@ -169,7 +169,7 @@ class TaskRunnerProxy : public base::TaskRunner {
base::SimpleTestTickClock* clock_;
// A min-heap of outstanding tasks.
- using Task = std::pair<base::TimeTicks, base::Closure>;
+ using Task = std::pair<base::TimeTicks, base::OnceClosure>;
std::vector<Task> tasks_;
DISALLOW_COPY_AND_ASSIGN(TaskRunnerProxy);
« no previous file with comments | « chrome/browser/chromeos/login/users/mock_user_manager.cc ('k') | chromecast/base/system_time_change_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698