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/chromeos/drive/fileapi/async_file_util.h" | 5 #include "chrome/browser/chromeos/drive/fileapi/async_file_util.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 base::Bind(&fileapi_internal::GetFileSystemFromUrl, url), | 194 base::Bind(&fileapi_internal::GetFileSystemFromUrl, url), |
195 base::Bind(&fileapi_internal::CreateDirectory, | 195 base::Bind(&fileapi_internal::CreateDirectory, |
196 file_path, exclusive, recursive, | 196 file_path, exclusive, recursive, |
197 google_apis::CreateRelayCallback(callback)), | 197 google_apis::CreateRelayCallback(callback)), |
198 base::Bind(callback, base::File::FILE_ERROR_FAILED)); | 198 base::Bind(callback, base::File::FILE_ERROR_FAILED)); |
199 } | 199 } |
200 | 200 |
201 void AsyncFileUtil::GetFileInfo( | 201 void AsyncFileUtil::GetFileInfo( |
202 scoped_ptr<storage::FileSystemOperationContext> context, | 202 scoped_ptr<storage::FileSystemOperationContext> context, |
203 const storage::FileSystemURL& url, | 203 const storage::FileSystemURL& url, |
| 204 int /* fields */, |
204 const GetFileInfoCallback& callback) { | 205 const GetFileInfoCallback& callback) { |
205 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 206 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
206 | 207 |
207 base::FilePath file_path = util::ExtractDrivePathFromFileSystemUrl(url); | 208 base::FilePath file_path = util::ExtractDrivePathFromFileSystemUrl(url); |
208 if (file_path.empty()) { | 209 if (file_path.empty()) { |
209 callback.Run(base::File::FILE_ERROR_NOT_FOUND, base::File::Info()); | 210 callback.Run(base::File::FILE_ERROR_NOT_FOUND, base::File::Info()); |
210 return; | 211 return; |
211 } | 212 } |
212 | 213 |
213 PostFileSystemCallback( | 214 PostFileSystemCallback( |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 base::Bind(&RunCreateSnapshotFileCallback, callback))), | 444 base::Bind(&RunCreateSnapshotFileCallback, callback))), |
444 base::Bind(callback, | 445 base::Bind(callback, |
445 base::File::FILE_ERROR_FAILED, | 446 base::File::FILE_ERROR_FAILED, |
446 base::File::Info(), | 447 base::File::Info(), |
447 base::FilePath(), | 448 base::FilePath(), |
448 scoped_refptr<storage::ShareableFileReference>())); | 449 scoped_refptr<storage::ShareableFileReference>())); |
449 } | 450 } |
450 | 451 |
451 } // namespace internal | 452 } // namespace internal |
452 } // namespace drive | 453 } // namespace drive |
OLD | NEW |