| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/fileapi/syncable/syncable_file_operation_runner.h" | 5 #include "webkit/browser/fileapi/syncable/syncable_file_operation_runner.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "webkit/fileapi/syncable/local_file_sync_status.h" | 12 #include "webkit/browser/fileapi/syncable/local_file_sync_status.h" |
| 13 | 13 |
| 14 using fileapi::FileSystemURL; | 14 using fileapi::FileSystemURL; |
| 15 | 15 |
| 16 namespace sync_file_system { | 16 namespace sync_file_system { |
| 17 | 17 |
| 18 // SyncableFileOperationRunner::Task ------------------------------------------- | 18 // SyncableFileOperationRunner::Task ------------------------------------------- |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 void SyncableFileOperationRunner::Task::CancelAndDelete( | 21 void SyncableFileOperationRunner::Task::CancelAndDelete( |
| 22 SyncableFileOperationRunner::Task* task) { | 22 SyncableFileOperationRunner::Task* task) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 sync_status()->EndWriting(target_paths[i]); | 98 sync_status()->EndWriting(target_paths[i]); |
| 99 } | 99 } |
| 100 RunNextRunnableTask(); | 100 RunNextRunnableTask(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool SyncableFileOperationRunner::ShouldStartMoreTasks() const { | 103 bool SyncableFileOperationRunner::ShouldStartMoreTasks() const { |
| 104 return num_inflight_tasks_ < max_inflight_tasks_; | 104 return num_inflight_tasks_ < max_inflight_tasks_; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace sync_file_system | 107 } // namespace sync_file_system |
| OLD | NEW |