| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <deque> | 10 #include <deque> |
| 9 #include <map> | 11 #include <map> |
| 10 | 12 |
| 11 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/chromeos/file_system_provider/abort_callback.h" | 17 #include "chrome/browser/chromeos/file_system_provider/abort_callback.h" |
| 15 #include "storage/browser/fileapi/async_file_util.h" | 18 #include "storage/browser/fileapi/async_file_util.h" |
| 16 | 19 |
| 17 namespace chromeos { | 20 namespace chromeos { |
| 18 namespace file_system_provider { | 21 namespace file_system_provider { |
| 19 | 22 |
| 20 // Queues arbitrary tasks. At most |max_in_parallel_| tasks will be running at | 23 // Queues arbitrary tasks. At most |max_in_parallel_| tasks will be running at |
| 21 // once. | 24 // once. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 std::map<int, Task> executed_; | 85 std::map<int, Task> executed_; |
| 83 | 86 |
| 84 base::WeakPtrFactory<Queue> weak_ptr_factory_; | 87 base::WeakPtrFactory<Queue> weak_ptr_factory_; |
| 85 DISALLOW_COPY_AND_ASSIGN(Queue); | 88 DISALLOW_COPY_AND_ASSIGN(Queue); |
| 86 }; | 89 }; |
| 87 | 90 |
| 88 } // namespace file_system_provider | 91 } // namespace file_system_provider |
| 89 } // namespace chromeos | 92 } // namespace chromeos |
| 90 | 93 |
| 91 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_QUEUE_H_ |
| OLD | NEW |