OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/local/syncable_file_operation_runner.h
" | 5 #include "chrome/browser/sync_file_system/local/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 | 12 |
13 using fileapi::FileSystemURL; | 13 using storage::FileSystemURL; |
14 | 14 |
15 namespace sync_file_system { | 15 namespace sync_file_system { |
16 | 16 |
17 // SyncableFileOperationRunner::Task ------------------------------------------- | 17 // SyncableFileOperationRunner::Task ------------------------------------------- |
18 | 18 |
19 // static | 19 // static |
20 void SyncableFileOperationRunner::Task::CancelAndDelete( | 20 void SyncableFileOperationRunner::Task::CancelAndDelete( |
21 SyncableFileOperationRunner::Task* task) { | 21 SyncableFileOperationRunner::Task* task) { |
22 task->Cancel(); | 22 task->Cancel(); |
23 delete task; | 23 delete task; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 sync_status()->EndWriting(target_paths[i]); | 97 sync_status()->EndWriting(target_paths[i]); |
98 } | 98 } |
99 RunNextRunnableTask(); | 99 RunNextRunnableTask(); |
100 } | 100 } |
101 | 101 |
102 bool SyncableFileOperationRunner::ShouldStartMoreTasks() const { | 102 bool SyncableFileOperationRunner::ShouldStartMoreTasks() const { |
103 return num_inflight_tasks_ < max_inflight_tasks_; | 103 return num_inflight_tasks_ < max_inflight_tasks_; |
104 } | 104 } |
105 | 105 |
106 } // namespace sync_file_system | 106 } // namespace sync_file_system |
OLD | NEW |