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_system_operation.h
" | 5 #include "chrome/browser/sync_file_system/local/syncable_file_system_operation.h
" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" | 8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" |
9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
10 #include "chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
" | 10 #include "chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 void SyncableFileSystemOperation::FileExists( | 170 void SyncableFileSystemOperation::FileExists( |
171 const FileSystemURL& url, | 171 const FileSystemURL& url, |
172 const StatusCallback& callback) { | 172 const StatusCallback& callback) { |
173 DCHECK(CalledOnValidThread()); | 173 DCHECK(CalledOnValidThread()); |
174 impl_->FileExists(url, callback); | 174 impl_->FileExists(url, callback); |
175 } | 175 } |
176 | 176 |
177 void SyncableFileSystemOperation::GetMetadata( | 177 void SyncableFileSystemOperation::GetMetadata( |
178 const FileSystemURL& url, | 178 const FileSystemURL& url, |
| 179 int fields, |
179 const GetMetadataCallback& callback) { | 180 const GetMetadataCallback& callback) { |
180 DCHECK(CalledOnValidThread()); | 181 DCHECK(CalledOnValidThread()); |
181 impl_->GetMetadata(url, callback); | 182 impl_->GetMetadata(url, fields, callback); |
182 } | 183 } |
183 | 184 |
184 void SyncableFileSystemOperation::ReadDirectory( | 185 void SyncableFileSystemOperation::ReadDirectory( |
185 const FileSystemURL& url, | 186 const FileSystemURL& url, |
186 const ReadDirectoryCallback& callback) { | 187 const ReadDirectoryCallback& callback) { |
187 DCHECK(CalledOnValidThread()); | 188 DCHECK(CalledOnValidThread()); |
188 // This is a read operation and there'd be no hard to let it go even if | 189 // This is a read operation and there'd be no hard to let it go even if |
189 // directory operation is disabled. (And we should allow this if it's made | 190 // directory operation is disabled. (And we should allow this if it's made |
190 // on the root directory) | 191 // on the root directory) |
191 impl_->ReadDirectory(url, callback); | 192 impl_->ReadDirectory(url, callback); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 operation_runner_->OnOperationCompleted(target_paths_); | 388 operation_runner_->OnOperationCompleted(target_paths_); |
388 callback.Run(result, bytes, complete); | 389 callback.Run(result, bytes, complete); |
389 } | 390 } |
390 | 391 |
391 void SyncableFileSystemOperation::OnCancelled() { | 392 void SyncableFileSystemOperation::OnCancelled() { |
392 DCHECK(!completion_callback_.is_null()); | 393 DCHECK(!completion_callback_.is_null()); |
393 completion_callback_.Run(base::File::FILE_ERROR_ABORT); | 394 completion_callback_.Run(base::File::FILE_ERROR_ABORT); |
394 } | 395 } |
395 | 396 |
396 } // namespace sync_file_system | 397 } // namespace sync_file_system |
OLD | NEW |