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/file_system_provider/fileapi/provider_async_fi
le_util.h" | 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi
le_util.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 void GetFileInfoOnUIThread( | 26 void GetFileInfoOnUIThread( |
27 scoped_ptr<storage::FileSystemOperationContext> context, | 27 scoped_ptr<storage::FileSystemOperationContext> context, |
28 const storage::FileSystemURL& url, | 28 const storage::FileSystemURL& url, |
29 const ProvidedFileSystemInterface::GetMetadataCallback& callback) { | 29 const ProvidedFileSystemInterface::GetMetadataCallback& callback) { |
30 util::FileSystemURLParser parser(url); | 30 util::FileSystemURLParser parser(url); |
31 if (!parser.Parse()) { | 31 if (!parser.Parse()) { |
32 callback.Run(EntryMetadata(), base::File::FILE_ERROR_INVALID_OPERATION); | 32 callback.Run(EntryMetadata(), base::File::FILE_ERROR_INVALID_OPERATION); |
33 return; | 33 return; |
34 } | 34 } |
35 | 35 |
36 parser.file_system()->GetMetadata(parser.file_path(), callback); | 36 parser.file_system()->GetMetadata( |
| 37 parser.file_path(), |
| 38 ProvidedFileSystemInterface::METADATA_FIELD_DEFAULT, |
| 39 callback); |
37 } | 40 } |
38 | 41 |
39 // Routes the response of GetFileInfo back to the IO thread with a type | 42 // Routes the response of GetFileInfo back to the IO thread with a type |
40 // conversion. | 43 // conversion. |
41 void OnGetFileInfo(const storage::AsyncFileUtil::GetFileInfoCallback& callback, | 44 void OnGetFileInfo(const storage::AsyncFileUtil::GetFileInfoCallback& callback, |
42 const EntryMetadata& metadata, | 45 const EntryMetadata& metadata, |
43 base::File::Error result) { | 46 base::File::Error result) { |
44 base::File::Info file_info; | 47 base::File::Info file_info; |
45 | 48 |
46 // TODO(mtomasz): Add support for last modified time and creation time. | 49 // TODO(mtomasz): Add support for last modified time and creation time. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 NOTIMPLEMENTED(); | 442 NOTIMPLEMENTED(); |
440 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, | 443 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, |
441 base::File::Info(), | 444 base::File::Info(), |
442 base::FilePath(), | 445 base::FilePath(), |
443 scoped_refptr<storage::ShareableFileReference>()); | 446 scoped_refptr<storage::ShareableFileReference>()); |
444 } | 447 } |
445 | 448 |
446 } // namespace internal | 449 } // namespace internal |
447 } // namespace file_system_provider | 450 } // namespace file_system_provider |
448 } // namespace chromeos | 451 } // namespace chromeos |
OLD | NEW |