| 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 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 if (client_) | 255 if (client_) |
| 256 client_->NotifyLastOperationStatus(status, task_used_network); | 256 client_->NotifyLastOperationStatus(status, task_used_network); |
| 257 | 257 |
| 258 if (!callback.is_null()) | 258 if (!callback.is_null()) |
| 259 callback.Run(status); | 259 callback.Run(status); |
| 260 | 260 |
| 261 // Post MaybeStartNextForegroundTask rather than calling it directly to avoid | 261 // Post MaybeStartNextForegroundTask rather than calling it directly to avoid |
| 262 // making the call-chaing longer. | 262 // making the call-chaing longer. |
| 263 task_runner_->PostTask( | 263 task_runner_->PostTask( |
| 264 FROM_HERE, | 264 FROM_HERE, |
| 265 base::Bind(&SyncTaskManager::MaybeStartNextForegroundTask, | 265 base::BindOnce(&SyncTaskManager::MaybeStartNextForegroundTask, |
| 266 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token))); | 266 weak_ptr_factory_.GetWeakPtr(), base::Passed(&token))); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void SyncTaskManager::UpdateTaskBlockerBody( | 269 void SyncTaskManager::UpdateTaskBlockerBody( |
| 270 std::unique_ptr<SyncTaskToken> foreground_task_token, | 270 std::unique_ptr<SyncTaskToken> foreground_task_token, |
| 271 std::unique_ptr<SyncTaskToken> background_task_token, | 271 std::unique_ptr<SyncTaskToken> background_task_token, |
| 272 std::unique_ptr<TaskLogger::TaskLog> task_log, | 272 std::unique_ptr<TaskLogger::TaskLog> task_log, |
| 273 std::unique_ptr<TaskBlocker> task_blocker, | 273 std::unique_ptr<TaskBlocker> task_blocker, |
| 274 const Continuation& continuation) { | 274 const Continuation& continuation) { |
| 275 DCHECK(sequence_checker_.CalledOnValidSequence()); | 275 DCHECK(sequence_checker_.CalledOnValidSequence()); |
| 276 | 276 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 closure.Run(); | 407 closure.Run(); |
| 408 return; | 408 return; |
| 409 } | 409 } |
| 410 | 410 |
| 411 if (client_) | 411 if (client_) |
| 412 client_->MaybeScheduleNextTask(); | 412 client_->MaybeScheduleNextTask(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 } // namespace drive_backend | 415 } // namespace drive_backend |
| 416 } // namespace sync_file_system | 416 } // namespace sync_file_system |
| OLD | NEW |