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

Unified Diff: storage/browser/fileapi/file_system_operation.h

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: storage/browser/fileapi/file_system_operation.h
diff --git a/storage/browser/fileapi/file_system_operation.h b/storage/browser/fileapi/file_system_operation.h
index b9e6f95cf26c7829276f63e72a8319a86ad94908..8580b351be24a512868ec84a07fbbfb2653a1fab 100644
--- a/storage/browser/fileapi/file_system_operation.h
+++ b/storage/browser/fileapi/file_system_operation.h
@@ -227,6 +227,14 @@ class FileSystemOperation {
OPTION_PRESERVE_LAST_MODIFIED,
};
+ // Fields requested for the GetMetadata method. Used as a bitmask.
+ enum GetMetadataField {
+ GET_METADATA_FIELD_NONE = 0,
+ GET_METADATA_FIELD_SIZE = 1 << 0,
+ GET_METADATA_FIELD_IS_DIRECTORY = 1 << 1,
+ GET_METADATA_FIELD_LAST_MODIFIED = 1 << 2
+ };
+
// Used for Write().
typedef base::Callback<void(base::File::Error result,
int64 bytes,
@@ -302,6 +310,7 @@ class FileSystemOperation {
// Gets the metadata of a file or directory at |path|.
virtual void GetMetadata(const FileSystemURL& path,
+ int fields,
const GetMetadataCallback& callback) = 0;
// Reads contents of a directory at |path|.
« no previous file with comments | « storage/browser/fileapi/file_system_dir_url_request_job.cc ('k') | storage/browser/fileapi/file_system_operation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698