OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/scheduler/base/virtual_time_domain.h" | 5 #include "components/scheduler/base/virtual_time_domain.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "components/scheduler/base/task_queue_impl.h" | 8 #include "components/scheduler/base/task_queue_impl.h" |
9 #include "components/scheduler/base/task_queue_manager_delegate.h" | 9 #include "components/scheduler/base/task_queue_manager_delegate.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... | |
37 return false; | 37 return false; |
38 } | 38 } |
39 | 39 |
40 void VirtualTimeDomain::AsValueIntoInternal( | 40 void VirtualTimeDomain::AsValueIntoInternal( |
41 base::trace_event::TracedValue* state) const {} | 41 base::trace_event::TracedValue* state) const {} |
42 | 42 |
43 void VirtualTimeDomain::AdvanceTo(base::TimeTicks now) { | 43 void VirtualTimeDomain::AdvanceTo(base::TimeTicks now) { |
44 base::AutoLock lock(lock_); | 44 base::AutoLock lock(lock_); |
45 DCHECK_GE(now, now_); | 45 DCHECK_GE(now, now_); |
46 now_ = now; | 46 now_ = now; |
47 DCHECK(task_queue_manager_delegate_); | |
48 | |
49 LazyNow lazy_now(now_); | |
50 WakeupReadyDelayedQueues(&lazy_now); | |
Sami
2015/11/24 12:48:48
Isn't the DoWork going to do this? Why do it twice
alex clarke (OOO till 29th)
2015/11/25 12:29:36
Seems it isn't needed. It definitely was at one s
| |
47 task_queue_manager_delegate_->PostTask(FROM_HERE, do_work_closure_); | 51 task_queue_manager_delegate_->PostTask(FROM_HERE, do_work_closure_); |
48 } | 52 } |
49 | 53 |
50 const char* VirtualTimeDomain::GetName() const { | 54 const char* VirtualTimeDomain::GetName() const { |
51 return "VirtualTimeDomain"; | 55 return "VirtualTimeDomain"; |
52 } | 56 } |
53 | 57 |
54 } // namespace scheduler | 58 } // namespace scheduler |
OLD | NEW |