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 SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/gtest_prod_util.h" | |
14 #include "base/macros.h" | 13 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
16 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
17 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
19 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
20 #include "net/base/backoff_entry.h" | 19 #include "net/base/backoff_entry.h" |
21 | 20 |
22 namespace syncer { | 21 namespace syncer { |
23 | 22 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 273 } |
275 | 274 |
276 template <typename T> | 275 template <typename T> |
277 bool TaskQueue<T>::ShouldDispatch() { | 276 bool TaskQueue<T>::ShouldDispatch() { |
278 return num_in_progress_ < kMaxConcurrentTasks && !queue_.empty(); | 277 return num_in_progress_ < kMaxConcurrentTasks && !queue_.empty(); |
279 } | 278 } |
280 | 279 |
281 } // namespace syncer | 280 } // namespace syncer |
282 | 281 |
283 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ | 282 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_ |
OLD | NEW |