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

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

Issue 1374653003: scheduler: Add a base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed gn clobber 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_sets.h" 5 #include "components/scheduler/base/task_queue_sets.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/scheduler/child/task_queue_impl.h" 8 #include "components/scheduler/base/task_queue_impl.h"
9 9
10 namespace scheduler { 10 namespace scheduler {
11 namespace internal { 11 namespace internal {
12 12
13 TaskQueueSets::TaskQueueSets(size_t num_sets) 13 TaskQueueSets::TaskQueueSets(size_t num_sets)
14 : enqueue_order_to_queue_maps_(num_sets) {} 14 : enqueue_order_to_queue_maps_(num_sets) {}
15 15
16 TaskQueueSets::~TaskQueueSets() {} 16 TaskQueueSets::~TaskQueueSets() {}
17 17
18 void TaskQueueSets::RemoveQueue(internal::TaskQueueImpl* queue) { 18 void TaskQueueSets::RemoveQueue(internal::TaskQueueImpl* queue) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 size_t set_index, 80 size_t set_index,
81 internal::TaskQueueImpl** out_queue) const { 81 internal::TaskQueueImpl** out_queue) const {
82 DCHECK_LT(set_index, enqueue_order_to_queue_maps_.size()); 82 DCHECK_LT(set_index, enqueue_order_to_queue_maps_.size());
83 if (enqueue_order_to_queue_maps_[set_index].empty()) 83 if (enqueue_order_to_queue_maps_[set_index].empty())
84 return false; 84 return false;
85 *out_queue = enqueue_order_to_queue_maps_[set_index].begin()->second; 85 *out_queue = enqueue_order_to_queue_maps_[set_index].begin()->second;
86 return true; 86 return true;
87 } 87 }
88 88
89 bool TaskQueueSets::IsSetEmpty(size_t set_index) const { 89 bool TaskQueueSets::IsSetEmpty(size_t set_index) const {
90 DCHECK_LT(set_index, enqueue_order_to_queue_maps_.size()) 90 DCHECK_LT(set_index, enqueue_order_to_queue_maps_.size()) << " set_index = "
91 << " set_index = " << set_index; 91 << set_index;
92 return enqueue_order_to_queue_maps_[set_index].empty(); 92 return enqueue_order_to_queue_maps_[set_index].empty();
93 } 93 }
94 94
95 } // namespace internal 95 } // namespace internal
96 } // namespace scheduler 96 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/base/task_queue_sets.h ('k') | components/scheduler/base/task_queue_sets_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698