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

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. 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
« no previous file with comments | « cc/test/begin_frame_args_test.cc ('k') | cc/test/ordered_simple_task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..91ea4be75cdc67f99e607ff90af27bb3cf2171c8 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 {
@@ -48,9 +48,7 @@ class TestOrderablePendingTask : public base::TestPendingTask {
// which don't have a delay even though it is queued early.
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 +60,8 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
bool RunsTasksOnCurrentThread() const override;
+ static base::TimeTicks AbsoluteMaxNow();
+
// 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 +138,8 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner {
base::ThreadChecker thread_checker_;
bool advance_now_;
- scoped_refptr<TestNowSource> now_src_;
+ // Not owned.
+ base::SimpleTestTickClock* now_src_;
size_t max_tasks_;
« no previous file with comments | « cc/test/begin_frame_args_test.cc ('k') | cc/test/ordered_simple_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698