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

Unified Diff: cc/test/ordered_simple_task_runner.h

Issue 1132753008: Replaced TestNowSource with SimpleTestTickClock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased again. Replaces TimeSource with TickClock in TestAlwaysFailTimeSource Created 5 years, 6 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: cc/test/ordered_simple_task_runner.h
diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h
index 68483037359d83d2dc3f90b91403a497979618f6..483ccd680c9fa13f87571792b56c94299965e505 100644
--- a/cc/test/ordered_simple_task_runner.h
+++ b/cc/test/ordered_simple_task_runner.h
@@ -12,9 +12,9 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_simple_task_runner.h"
#include "base/trace_event/trace_event.h"
-#include "cc/test/test_now_source.h"
namespace cc {
@@ -49,8 +49,7 @@ class TestOrderablePendingTask : public base::TestPendingTask {
class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
public:
OrderedSimpleTaskRunner();
- OrderedSimpleTaskRunner(scoped_refptr<TestNowSource> now_src,
- bool advance_now);
+ OrderedSimpleTaskRunner(base::SimpleTestTickClock* now_src, bool advance_now);
// base::TestSimpleTaskRunner implementation:
bool PostDelayedTask(const tracked_objects::Location& from_here,
@@ -62,6 +61,8 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
bool RunsTasksOnCurrentThread() const override;
+ static const base::TimeTicks kAbsoluteMaxNow;
+
// Set a maximum number of tasks to run at once. Useful as a timeout to
// prevent infinite task loops.
static const size_t kAbsoluteMaxTasks;
@@ -138,7 +139,7 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
base::ThreadChecker thread_checker_;
bool advance_now_;
- scoped_refptr<TestNowSource> now_src_;
+ base::SimpleTestTickClock* now_src_;
Sami 2015/06/05 17:11:07 Who owns this object? One of the constructors take
Ankur Verma 2015/06/08 07:11:34 Done. Removed the ctor which allocated but never f
size_t max_tasks_;

Powered by Google App Engine
This is Rietveld 408576698