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

Side by Side Diff: components/scheduler/base/real_time_domain.cc

Issue 1432263002: (reland) Adds TimeDomains to the TaskQueueManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing some more feedback. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/scheduler/base/real_time_domain.h"
6
7 #include "base/bind.h"
8 #include "components/scheduler/base/task_queue_impl.h"
9 #include "components/scheduler/base/task_queue_manager_delegate.h"
10
11 namespace scheduler {
12
13 RealTimeDomain::RealTimeDomain(TaskQueueManagerDelegate* delegate,
14 base::Closure do_work_closure)
15 : TimeDomain(delegate), do_work_closure_(do_work_closure) {}
16
17 RealTimeDomain::~RealTimeDomain() {}
18
19 LazyNow RealTimeDomain::GetLazyNow() {
20 return LazyNow(task_queue_manager_delegate());
21 }
22
23 void RealTimeDomain::ScheduleDoWork(base::TimeDelta delay) {
24 task_queue_manager_delegate()->PostDelayedTask(FROM_HERE, do_work_closure_,
25 delay);
26 }
27
28 bool RealTimeDomain::MaybeAdvanceTime() {
29 return false;
30 }
31
32 void RealTimeDomain::AsValueIntoInternal(
33 base::trace_event::TracedValue* state) const {}
34
35 const char* RealTimeDomain::GetName() const {
36 return "RealTimeDomain";
37 }
38
39 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698