| Index: webkit/blob/blob_data.h
|
| diff --git a/webkit/blob/blob_data.h b/webkit/blob/blob_data.h
|
| index 3d276f0509e70872c9646a30af2030d9b1d9e605..1f7191ff3b646b854b0a5fcfa77abcde95a61c77 100644
|
| --- a/webkit/blob/blob_data.h
|
| +++ b/webkit/blob/blob_data.h
|
| @@ -27,7 +27,8 @@ class BLOB_EXPORT BlobData : public base::RefCounted<BlobData> {
|
| TYPE_DATA,
|
| TYPE_DATA_EXTERNAL,
|
| TYPE_FILE,
|
| - TYPE_BLOB
|
| + TYPE_BLOB,
|
| + TYPE_FILE_FILESYSTEM,
|
| };
|
|
|
| struct BLOB_EXPORT Item {
|
| @@ -63,15 +64,25 @@ class BLOB_EXPORT BlobData : public base::RefCounted<BlobData> {
|
|
|
| void SetToBlob(const GURL& blob_url, uint64 offset, uint64 length) {
|
| type = TYPE_BLOB;
|
| - this->blob_url = blob_url;
|
| + this->url = blob_url;
|
| this->offset = offset;
|
| this->length = length;
|
| }
|
|
|
| + void SetToFileSystemFile(
|
| + const GURL& url, uint64 offset, uint64 length,
|
| + const base::Time& expected_modification_time) {
|
| + type = TYPE_FILE_FILESYSTEM;
|
| + this->url = url;
|
| + this->offset = offset;
|
| + this->length = length;
|
| + this->expected_modification_time = expected_modification_time;
|
| + }
|
| +
|
| Type type;
|
| std::string data; // For Data type.
|
| const char* data_external; // For DataExternal type.
|
| - GURL blob_url; // For Blob type.
|
| + GURL url; // For Blob or FileSystem File type.
|
| FilePath file_path; // For File type.
|
| base::Time expected_modification_time; // Also for File type.
|
| uint64 offset;
|
| @@ -90,6 +101,9 @@ class BLOB_EXPORT BlobData : public base::RefCounted<BlobData> {
|
| void AppendFile(const FilePath& file_path, uint64 offset, uint64 length,
|
| const base::Time& expected_modification_time);
|
|
|
| + void AppendFileSystemFile(const GURL& url, uint64 offset, uint64 length,
|
| + const base::Time& expected_modification_time);
|
| +
|
| void AppendBlob(const GURL& blob_url, uint64 offset, uint64 length);
|
|
|
| void AttachShareableFileReference(ShareableFileReference* reference) {
|
| @@ -141,7 +155,7 @@ inline bool operator==(const BlobData::Item& a, const BlobData::Item& b) {
|
| a.expected_modification_time == b.expected_modification_time;
|
| }
|
| if (a.type == BlobData::TYPE_BLOB) {
|
| - return a.blob_url == b.blob_url &&
|
| + return a.url == b.url &&
|
| a.offset == b.offset &&
|
| a.length == b.length;
|
| }
|
|
|