Index: chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
index 064276fc449b5fba27ea4265967254c8e423dc38..740ad119a68018d47ed7838a2beff82a63b88e94 100644 |
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
@@ -40,6 +40,7 @@ struct EntryMetadata { |
int64 size; |
base::Time modification_time; |
std::string mime_type; |
+ std::string thumbnail; |
}; |
// Interface for a provided file system. Acts as a proxy between providers |
@@ -49,6 +50,15 @@ struct EntryMetadata { |
// fails synchronously. |
class ProvidedFileSystemInterface { |
public: |
+ // Mode of opening a file. Used by OpenFile(). |
+ enum OpenFileMode { OPEN_FILE_MODE_READ, OPEN_FILE_MODE_WRITE }; |
+ |
+ // Extra fields to be fetched with metadata. |
+ enum MetadataField { |
+ METADATA_FIELD_DEFAULT = 0, |
+ METADATA_FIELD_THUMBNAIL = 1 << 0 |
+ }; |
+ |
typedef base::Callback<void(int file_handle, base::File::Error result)> |
OpenFileCallback; |
@@ -62,8 +72,8 @@ class ProvidedFileSystemInterface { |
typedef base::Callback<void( |
const storage::AsyncFileUtil::StatusCallback& callback)> AbortCallback; |
- // Mode of opening a file. Used by OpenFile(). |
- enum OpenFileMode { OPEN_FILE_MODE_READ, OPEN_FILE_MODE_WRITE }; |
+ // Mask of fields requested from the GetMetadata() call. |
+ typedef int MetadataFieldMask; |
virtual ~ProvidedFileSystemInterface() {} |
@@ -73,8 +83,10 @@ class ProvidedFileSystemInterface { |
const storage::AsyncFileUtil::StatusCallback& callback) = 0; |
// Requests metadata of the passed |entry_path|. It can be either a file |
- // or a directory. |
+ // or a directory. All |fields| will be returned if supported. Note, that |
+ // default fields are always returned. |
virtual AbortCallback GetMetadata(const base::FilePath& entry_path, |
+ MetadataFieldMask fields, |
const GetMetadataCallback& callback) = 0; |
// Requests enumerating entries from the passed |directory_path|. The callback |