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

Unified Diff: components/scheduler/child/task_queue_manager.cc

Issue 1163143002: Scheduler/child/TimeSource could be replaced with base/time/DefaultTickClock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error 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 | « components/scheduler/child/task_queue_manager.h ('k') | components/scheduler/child/test_time_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/task_queue_manager.cc
diff --git a/components/scheduler/child/task_queue_manager.cc b/components/scheduler/child/task_queue_manager.cc
index d9fa47c9203ff6e4da49dc4f2ffb8e9eb088bad5..569c4fa737f9d7f0647d7bb1ceed15b07333bfe8 100644
--- a/components/scheduler/child/task_queue_manager.cc
+++ b/components/scheduler/child/task_queue_manager.cc
@@ -8,11 +8,11 @@
#include <set>
#include "base/bind.h"
+#include "base/time/default_tick_clock.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "components/scheduler/child/nestable_single_thread_task_runner.h"
#include "components/scheduler/child/task_queue_selector.h"
-#include "components/scheduler/child/time_source.h"
namespace {
const int64_t kMaxTimeTicks = std::numeric_limits<int64>::max();
@@ -467,7 +467,7 @@ TaskQueueManager::TaskQueueManager(
task_was_run_bitmap_(0),
pending_dowork_count_(0),
work_batch_size_(1),
- time_source_(new TimeSource),
+ time_source_(new base::DefaultTickClock),
disabled_by_default_tracing_category_(
disabled_by_default_tracing_category),
deletion_sentinel_(new DeletionSentinel()),
@@ -724,7 +724,7 @@ void TaskQueueManager::RemoveTaskObserver(
}
void TaskQueueManager::SetTimeSourceForTesting(
- scoped_ptr<TimeSource> time_source) {
+ scoped_ptr<base::TickClock> time_source) {
DCHECK(main_thread_checker_.CalledOnValidThread());
time_source_ = time_source.Pass();
}
@@ -736,7 +736,7 @@ uint64 TaskQueueManager::GetAndClearTaskWasRunOnQueueBitmap() {
}
base::TimeTicks TaskQueueManager::Now() const {
- return time_source_->Now();
+ return time_source_->NowTicks();
}
scoped_refptr<base::trace_event::ConvertableToTraceFormat>
« no previous file with comments | « components/scheduler/child/task_queue_manager.h ('k') | components/scheduler/child/test_time_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698