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

Unified Diff: components/scheduler/child/scheduler_helper.h

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 years, 2 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/scheduler/child/scheduler_helper.h
diff --git a/components/scheduler/child/scheduler_helper.h b/components/scheduler/child/scheduler_helper.h
index 241ae609d166f65e94f60378014a46c7e3e4d44f..061c5c5490a5762cccc3bdc07faa60d96d87fb6a 100644
--- a/components/scheduler/child/scheduler_helper.h
+++ b/components/scheduler/child/scheduler_helper.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
#define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
+#include "base/time/tick_clock.h"
#include "components/scheduler/base/task_queue_manager.h"
#include "components/scheduler/base/task_queue_selector.h"
#include "components/scheduler/scheduler_export.h"
@@ -81,12 +82,12 @@ class SCHEDULER_EXPORT SchedulerHelper : public TaskQueueManager::Observer {
void SetObserver(Observer* observer);
// Accessor methods.
+ base::TickClock* tick_clock() const;
base::TimeTicks Now() const;
Sami 2015/10/28 20:00:35 This looks redundant now.
alex clarke (OOO till 29th) 2015/10/29 18:23:13 Done.
base::TimeTicks NextPendingDelayedTaskRunTime() const;
bool GetAndClearSystemIsQuiescentBit();
// Test helpers.
- void SetTimeSourceForTesting(scoped_ptr<base::TickClock> time_source);
void SetWorkBatchSizeForTesting(size_t work_batch_size);
TaskQueueManager* GetTaskQueueManagerForTesting();
@@ -100,8 +101,6 @@ class SCHEDULER_EXPORT SchedulerHelper : public TaskQueueManager::Observer {
scoped_refptr<TaskQueue> control_after_wakeup_task_runner_;
scoped_refptr<TaskQueue> default_task_runner_;
- scoped_ptr<base::TickClock> time_source_;
-
Observer* observer_; // NOT OWNED
const char* tracing_category_;
const char* disabled_by_default_tracing_category_;

Powered by Google App Engine
This is Rietveld 408576698