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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/virtual_time_domain.cc

Issue 2590593002: Revert of [Reland] Scheduler refactoring to virtually eliminate redundant DoWorks (Closed)
Patch Set: Created 4 years 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
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 "platform/scheduler/base/virtual_time_domain.h" 5 #include "platform/scheduler/base/virtual_time_domain.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "platform/scheduler/base/task_queue_impl.h" 8 #include "platform/scheduler/base/task_queue_impl.h"
9 #include "platform/scheduler/base/task_queue_manager.h" 9 #include "platform/scheduler/base/task_queue_manager.h"
10 #include "platform/scheduler/base/task_queue_manager_delegate.h" 10 #include "platform/scheduler/base/task_queue_manager_delegate.h"
(...skipping 23 matching lines...) Expand all
34 return now_; 34 return now_;
35 } 35 }
36 36
37 void VirtualTimeDomain::RequestWakeup(base::TimeTicks now, 37 void VirtualTimeDomain::RequestWakeup(base::TimeTicks now,
38 base::TimeDelta delay) { 38 base::TimeDelta delay) {
39 // We don't need to do anything here because the caller of AdvanceTo is 39 // We don't need to do anything here because the caller of AdvanceTo is
40 // responsible for calling TaskQueueManager::MaybeScheduleImmediateWork if 40 // responsible for calling TaskQueueManager::MaybeScheduleImmediateWork if
41 // needed. 41 // needed.
42 } 42 }
43 43
44 base::Optional<base::TimeDelta> VirtualTimeDomain::DelayTillNextTask( 44 bool VirtualTimeDomain::MaybeAdvanceTime() {
45 LazyNow* lazy_now) { 45 return false;
46 return base::Optional<base::TimeDelta>();
47 } 46 }
48 47
49 void VirtualTimeDomain::AsValueIntoInternal( 48 void VirtualTimeDomain::AsValueIntoInternal(
50 base::trace_event::TracedValue* state) const {} 49 base::trace_event::TracedValue* state) const {}
51 50
52 void VirtualTimeDomain::AdvanceTo(base::TimeTicks now) { 51 void VirtualTimeDomain::AdvanceTo(base::TimeTicks now) {
53 base::AutoLock lock(lock_); 52 base::AutoLock lock(lock_);
54 DCHECK_GE(now, now_); 53 DCHECK_GE(now, now_);
55 now_ = now; 54 now_ = now;
56 } 55 }
57 56
58 void VirtualTimeDomain::RequestDoWork() { 57 void VirtualTimeDomain::RequestDoWork() {
59 task_queue_manager_->MaybeScheduleImmediateWork(FROM_HERE); 58 task_queue_manager_->MaybeScheduleImmediateWork(FROM_HERE);
60 } 59 }
61 60
62 const char* VirtualTimeDomain::GetName() const { 61 const char* VirtualTimeDomain::GetName() const {
63 return "VirtualTimeDomain"; 62 return "VirtualTimeDomain";
64 } 63 }
65 64
66 } // namespace scheduler 65 } // namespace scheduler
67 } // namespace blink 66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698