| Index: storage/common/data_element.h
|
| diff --git a/storage/common/data_element.h b/storage/common/data_element.h
|
| index 0efe1550a91e9a509d1cc0548854167a58c3a689..4184f993aa120b887051999280bec6b1098a0f53 100644
|
| --- a/storage/common/data_element.h
|
| +++ b/storage/common/data_element.h
|
| @@ -27,6 +27,7 @@ class STORAGE_COMMON_EXPORT DataElement {
|
| TYPE_FILE,
|
| TYPE_BLOB,
|
| TYPE_FILE_FILESYSTEM,
|
| + TYPE_DISK_CACHE_ENTRY,
|
| };
|
|
|
| DataElement();
|
| @@ -102,13 +103,16 @@ class STORAGE_COMMON_EXPORT DataElement {
|
| uint64 offset, uint64 length,
|
| const base::Time& expected_modification_time);
|
|
|
| + // Sets to TYPE_DISK_CACHE_ENTRY.
|
| + void SetToDiskCacheEntry();
|
| +
|
| private:
|
| Type type_;
|
| std::vector<char> buf_; // For TYPE_BYTES.
|
| const char* bytes_; // For TYPE_BYTES.
|
| base::FilePath path_; // For TYPE_FILE.
|
| GURL filesystem_url_; // For TYPE_FILE_FILESYSTEM.
|
| - std::string blob_uuid_;
|
| + std::string blob_uuid_; // For TYPE_BLOB.
|
| uint64 offset_;
|
| uint64 length_;
|
| base::Time expected_modification_time_;
|
| @@ -130,6 +134,8 @@ inline bool operator==(const DataElement& a, const DataElement& b) {
|
| return a.blob_uuid() == b.blob_uuid();
|
| case DataElement::TYPE_FILE_FILESYSTEM:
|
| return a.filesystem_url() == b.filesystem_url();
|
| + case DataElement::TYPE_DISK_CACHE_ENTRY:
|
| + return true; // These have no data, so they're always equal.
|
| case DataElement::TYPE_UNKNOWN:
|
| NOTREACHED();
|
| return false;
|
|
|