Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc

Issue 513683002: [fsp] Add support for providing thumbnails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698