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

Unified Diff: chrome/browser/chromeos/file_manager/fileapi_util.cc

Issue 1455403003: Add an option to specify requested fields for fetching metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_manager/fileapi_util.cc
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util.cc b/chrome/browser/chromeos/file_manager/fileapi_util.cc
index 3fd1505520d9b67c78cc11e22e273e01416dc0c1..2b9203048016c2a6a236ce0e3e88f566fe2a67a4 100644
--- a/chrome/browser/chromeos/file_manager/fileapi_util.cc
+++ b/chrome/browser/chromeos/file_manager/fileapi_util.cc
@@ -349,11 +349,12 @@ class ConvertSelectedFileInfoListToFileChooserFileInfoListImpl {
context_->operation_runner()->GetMetadata(
context_->CrackURL(it->file_system_url),
+ storage::FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY |
+ storage::FileSystemOperation::GET_METADATA_FIELD_SIZE |
+ storage::FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED,
base::Bind(&ConvertSelectedFileInfoListToFileChooserFileInfoListImpl::
OnGotMetadataOnIOThread,
- base::Unretained(this),
- base::Passed(&lifetime),
- it));
+ base::Unretained(this), base::Passed(&lifetime), it));
}
// Callback invoked after GetMetadata.
@@ -554,6 +555,7 @@ void CheckIfDirectoryExists(
void GetMetadataForPath(
scoped_refptr<storage::FileSystemContext> file_system_context,
const base::FilePath& entry_path,
+ int fields,
const storage::FileSystemOperationRunner::GetMetadataCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -568,7 +570,7 @@ void GetMetadataForPath(
base::Bind(
base::IgnoreResult(&storage::FileSystemOperationRunner::GetMetadata),
file_system_context->operation_runner()->AsWeakPtr(), internal_url,
- google_apis::CreateRelayCallback(callback)));
+ fields, google_apis::CreateRelayCallback(callback)));
}
storage::FileSystemURL CreateIsolatedURLFromVirtualPath(
« no previous file with comments | « chrome/browser/chromeos/file_manager/fileapi_util.h ('k') | chrome/browser/chromeos/file_manager/open_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698