| Index: storage/common/data_element.h
|
| diff --git a/storage/common/data_element.h b/storage/common/data_element.h
|
| index 0efe1550a91e9a509d1cc0548854167a58c3a689..a35d29d74bfbeab57665196c25e7b220f4aa4c47 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,6 +103,9 @@ class STORAGE_COMMON_EXPORT DataElement {
|
| uint64 offset, uint64 length,
|
| const base::Time& expected_modification_time);
|
|
|
| + // Sets to TYPE_DISK_CACHE_ENTRY with range.
|
| + void SetToDiskCacheEntryRange(uint64 offset, uint64 length);
|
| +
|
| private:
|
| Type type_;
|
| std::vector<char> buf_; // For TYPE_BYTES.
|
| @@ -130,6 +134,12 @@ 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:
|
| + // This comparison is really problematic; we could compare length and
|
| + // offset, but that would be deceptive: the disk cache entry itself can't
|
| + // be in the DataElement since it isn't serlializable. Thus, return |true|
|
| + // each time.
|
| + return true;
|
| case DataElement::TYPE_UNKNOWN:
|
| NOTREACHED();
|
| return false;
|
|
|