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

Unified Diff: content/browser/fileapi/fileapi_message_filter.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: content/browser/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 1babfd5454669950913d90559b765cd992354bc2..9ee9ede7307e20117d621e15c73e4a743885c407 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -316,7 +316,10 @@ void FileAPIMessageFilter::OnReadMetadata(
}
operations_[request_id] = operation_runner()->GetMetadata(
- url, base::Bind(&FileAPIMessageFilter::DidGetMetadata, this, request_id));
+ url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY |
+ FileSystemOperation::GET_METADATA_FIELD_SIZE |
+ FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED,
+ base::Bind(&FileAPIMessageFilter::DidGetMetadata, this, request_id));
}
void FileAPIMessageFilter::OnCreate(
@@ -493,9 +496,11 @@ void FileAPIMessageFilter::OnCreateSnapshotFile(
FileSystemBackend* backend = context_->GetFileSystemBackend(url.type());
if (backend->SupportsStreaming(url)) {
operations_[request_id] = operation_runner()->GetMetadata(
- url,
- base::Bind(&FileAPIMessageFilter::DidGetMetadataForStreaming,
- this, request_id));
+ url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY |
+ FileSystemOperation::GET_METADATA_FIELD_SIZE |
+ FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED,
+ base::Bind(&FileAPIMessageFilter::DidGetMetadataForStreaming, this,
+ request_id));
} else {
operations_[request_id] = operation_runner()->CreateSnapshotFile(
url,

Powered by Google App Engine
This is Rietveld 408576698