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 CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 16 #include "chrome/browser/sync_file_system/sync_callbacks.h" |
17 #include "chrome/browser/sync_file_system/task_logger.h" | 17 #include "chrome/browser/sync_file_system/task_logger.h" |
18 | 18 |
| 19 namespace base { |
| 20 class SequencedTaskRunner; |
| 21 } |
| 22 |
19 namespace sync_file_system { | 23 namespace sync_file_system { |
20 namespace drive_backend { | 24 namespace drive_backend { |
21 | 25 |
22 class SyncTaskManager; | 26 class SyncTaskManager; |
23 struct TaskBlocker; | 27 struct TaskBlocker; |
24 | 28 |
25 // Represents a running sequence of SyncTasks. Owned by a callback chain that | 29 // Represents a running sequence of SyncTasks. Owned by a callback chain that |
26 // should run exclusively, and held by SyncTaskManager when no task is running. | 30 // should run exclusively, and held by SyncTaskManager when no task is running. |
27 class SyncTaskToken { | 31 class SyncTaskToken { |
28 public: | 32 public: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 std::unique_ptr<TaskLogger::TaskLog> task_log_; | 89 std::unique_ptr<TaskLogger::TaskLog> task_log_; |
86 std::unique_ptr<TaskBlocker> task_blocker_; | 90 std::unique_ptr<TaskBlocker> task_blocker_; |
87 | 91 |
88 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken); | 92 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken); |
89 }; | 93 }; |
90 | 94 |
91 } // namespace drive_backend | 95 } // namespace drive_backend |
92 } // namespace sync_file_system | 96 } // namespace sync_file_system |
93 | 97 |
94 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ | 98 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ |
OLD | NEW |