OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_SYNC_API_IMPL_ATTACHMENTS_TASK_QUEUE_H_ | 5 #ifndef COMPONENTS_SYNC_MODEL_IMPL_ATTACHMENTS_TASK_QUEUE_H_ |
6 #define COMPONENTS_SYNC_API_IMPL_ATTACHMENTS_TASK_QUEUE_H_ | 6 #define COMPONENTS_SYNC_MODEL_IMPL_ATTACHMENTS_TASK_QUEUE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 queue_.pop_front(); | 276 queue_.pop_front(); |
277 } | 277 } |
278 | 278 |
279 template <typename T> | 279 template <typename T> |
280 bool TaskQueue<T>::ShouldDispatch() { | 280 bool TaskQueue<T>::ShouldDispatch() { |
281 return num_in_progress_ < kMaxConcurrentTasks && !queue_.empty(); | 281 return num_in_progress_ < kMaxConcurrentTasks && !queue_.empty(); |
282 } | 282 } |
283 | 283 |
284 } // namespace syncer | 284 } // namespace syncer |
285 | 285 |
286 #endif // COMPONENTS_SYNC_API_IMPL_ATTACHMENTS_TASK_QUEUE_H_ | 286 #endif // COMPONENTS_SYNC_MODEL_IMPL_ATTACHMENTS_TASK_QUEUE_H_ |
OLD | NEW |