| 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // If |token| is non-nullptr, put |token| back to |token_| beforehand. | 169 // If |token| is non-nullptr, put |token| back to |token_| beforehand. |
| 170 void MaybeStartNextForegroundTask(scoped_ptr<SyncTaskToken> token); | 170 void MaybeStartNextForegroundTask(scoped_ptr<SyncTaskToken> token); |
| 171 | 171 |
| 172 base::WeakPtr<Client> client_; | 172 base::WeakPtr<Client> client_; |
| 173 | 173 |
| 174 // Owns running SyncTask to cancel the task on SyncTaskManager deletion. | 174 // Owns running SyncTask to cancel the task on SyncTaskManager deletion. |
| 175 scoped_ptr<SyncTask> running_foreground_task_; | 175 scoped_ptr<SyncTask> running_foreground_task_; |
| 176 | 176 |
| 177 // Owns running backgrounded SyncTask to cancel the task on SyncTaskManager | 177 // Owns running backgrounded SyncTask to cancel the task on SyncTaskManager |
| 178 // deletion. | 178 // deletion. |
| 179 base::ScopedPtrHashMap<int64, SyncTask> running_background_tasks_; | 179 base::ScopedPtrHashMap<int64, scoped_ptr<SyncTask>> running_background_tasks_; |
| 180 | 180 |
| 181 size_t maximum_background_task_; | 181 size_t maximum_background_task_; |
| 182 | 182 |
| 183 // Holds pending continuation to move task to background. | 183 // Holds pending continuation to move task to background. |
| 184 base::Closure pending_backgrounding_task_; | 184 base::Closure pending_backgrounding_task_; |
| 185 | 185 |
| 186 std::priority_queue<PendingTask, std::vector<PendingTask>, | 186 std::priority_queue<PendingTask, std::vector<PendingTask>, |
| 187 PendingTaskComparator> pending_tasks_; | 187 PendingTaskComparator> pending_tasks_; |
| 188 int64 pending_task_seq_; | 188 int64 pending_task_seq_; |
| 189 int64 task_token_seq_; | 189 int64 task_token_seq_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 203 | 203 |
| 204 base::WeakPtrFactory<SyncTaskManager> weak_ptr_factory_;; | 204 base::WeakPtrFactory<SyncTaskManager> weak_ptr_factory_;; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(SyncTaskManager); | 206 DISALLOW_COPY_AND_ASSIGN(SyncTaskManager); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace drive_backend | 209 } // namespace drive_backend |
| 210 } // namespace sync_file_system | 210 } // namespace sync_file_system |
| 211 | 211 |
| 212 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ | 212 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ |
| OLD | NEW |