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 | |
23 namespace sync_file_system { | 19 namespace sync_file_system { |
24 namespace drive_backend { | 20 namespace drive_backend { |
25 | 21 |
26 class SyncTaskManager; | 22 class SyncTaskManager; |
27 struct TaskBlocker; | 23 struct TaskBlocker; |
28 | 24 |
29 // Represents a running sequence of SyncTasks. Owned by a callback chain that | 25 // Represents a running sequence of SyncTasks. Owned by a callback chain that |
30 // should run exclusively, and held by SyncTaskManager when no task is running. | 26 // should run exclusively, and held by SyncTaskManager when no task is running. |
31 class SyncTaskToken { | 27 class SyncTaskToken { |
32 public: | 28 public: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 std::unique_ptr<TaskLogger::TaskLog> task_log_; | 85 std::unique_ptr<TaskLogger::TaskLog> task_log_; |
90 std::unique_ptr<TaskBlocker> task_blocker_; | 86 std::unique_ptr<TaskBlocker> task_blocker_; |
91 | 87 |
92 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken); | 88 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken); |
93 }; | 89 }; |
94 | 90 |
95 } // namespace drive_backend | 91 } // namespace drive_backend |
96 } // namespace sync_file_system | 92 } // namespace sync_file_system |
97 | 93 |
98 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ | 94 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ |
OLD | NEW |