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

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: Fix thread_hop_task DCHECK 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
« no previous file with comments | « components/scheduler/base/real_time_domain.h ('k') | components/scheduler/base/task_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
14 TaskQueueManagerDelegate* task_queue_manager_delegate,
15 base::Closure do_work_closure)
16 : task_queue_manager_delegate_(task_queue_manager_delegate),
17 do_work_closure_(do_work_closure) {
18 DCHECK(task_queue_manager_delegate_);
19 }
20
21 RealTimeDomain::~RealTimeDomain() {}
22
23 LazyNow RealTimeDomain::CreateLazyNow() {
24 return LazyNow(task_queue_manager_delegate_);
25 }
26
27 void RealTimeDomain::RequestWakeup(base::TimeDelta delay) {
28 task_queue_manager_delegate_->PostDelayedTask(FROM_HERE, do_work_closure_,
29 delay);
30 }
31
32 bool RealTimeDomain::MaybeAdvanceTime() {
33 return false;
34 }
35
36 void RealTimeDomain::AsValueIntoInternal(
37 base::trace_event::TracedValue* state) const {}
38
39 const char* RealTimeDomain::GetName() const {
40 return "RealTimeDomain";
41 }
42
43 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/base/real_time_domain.h ('k') | components/scheduler/base/task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698