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

Side by Side Diff: components/scheduler/child/task_queue_impl.cc

Issue 1340343003: scheduler: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed gn build. Created 5 years, 2 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 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 "components/scheduler/child/task_queue_impl.h" 5 #include "components/scheduler/child/task_queue_impl.h"
6 6
7 #include "components/scheduler/child/task_queue_manager.h" 7 #include "components/scheduler/child/task_queue_manager.h"
8 8
9 namespace scheduler { 9 namespace scheduler {
10 namespace internal { 10 namespace internal {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #ifndef NDEBUG 49 #ifndef NDEBUG
50 enqueue_order_set_(false), 50 enqueue_order_set_(false),
51 #endif 51 #endif
52 enqueue_order_(0) { 52 enqueue_order_(0) {
53 sequence_num = sequence_number; 53 sequence_num = sequence_number;
54 } 54 }
55 55
56 void TaskQueueImpl::UnregisterTaskQueue() { 56 void TaskQueueImpl::UnregisterTaskQueue() {
57 if (!task_queue_manager_) 57 if (!task_queue_manager_)
58 return; 58 return;
59 task_queue_manager_->UnregisterTaskQueue(make_scoped_refptr(this)); 59 task_queue_manager_->UnregisterTaskQueue(this);
60 60
61 { 61 {
62 base::AutoLock lock(lock_); 62 base::AutoLock lock(lock_);
63 task_queue_manager_ = nullptr; 63 task_queue_manager_ = nullptr;
64 delayed_task_queue_ = std::priority_queue<Task>(); 64 delayed_task_queue_ = std::priority_queue<Task>();
65 incoming_queue_ = std::queue<Task>(); 65 incoming_queue_ = std::queue<Task>();
66 work_queue_ = std::queue<Task>(); 66 work_queue_ = std::queue<Task>();
67 } 67 }
68 } 68 }
69 69
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 state->SetBoolean("nestable", task.nestable); 495 state->SetBoolean("nestable", task.nestable);
496 state->SetBoolean("is_high_res", task.is_high_res); 496 state->SetBoolean("is_high_res", task.is_high_res);
497 state->SetDouble( 497 state->SetDouble(
498 "delayed_run_time", 498 "delayed_run_time",
499 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L); 499 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L);
500 state->EndDictionary(); 500 state->EndDictionary();
501 } 501 }
502 502
503 } // namespace internal 503 } // namespace internal
504 } // namespace scheduler 504 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/child/scheduler_helper_unittest.cc ('k') | components/scheduler/child/task_queue_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698