| Index: net/disk_cache/simple/simple_index_file.cc
|
| diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
|
| index ff26d4c2b1a9673f8514de7c725ac330bb708f95..7af809a88a01964372ea1f470ee940a97e9cbe3a 100644
|
| --- a/net/disk_cache/simple/simple_index_file.cc
|
| +++ b/net/disk_cache/simple/simple_index_file.cc
|
| @@ -337,11 +337,12 @@ bool SimpleIndexFile::IndexMetadata::CheckIndexMetadata() {
|
| return false;
|
| }
|
|
|
| - static_assert(kSimpleVersion == 7, "index metadata reader out of date");
|
| + static_assert(kSimpleVersion == 8, "index metadata reader out of date");
|
| // No |reason_| is saved in the version 6 file format.
|
| if (version_ == 6)
|
| return reason_ == SimpleIndex::INDEX_WRITE_REASON_MAX;
|
| - return version_ == 7 && reason_ < SimpleIndex::INDEX_WRITE_REASON_MAX;
|
| + return (version_ == 7 || version_ == 8) &&
|
| + reason_ < SimpleIndex::INDEX_WRITE_REASON_MAX;
|
| }
|
|
|
| SimpleIndexFile::SimpleIndexFile(
|
| @@ -555,7 +556,8 @@ void SimpleIndexFile::Deserialize(const char* data, int data_len,
|
| uint64_t hash_key;
|
| EntryMetadata entry_metadata;
|
| if (!pickle_it.ReadUInt64(&hash_key) ||
|
| - !entry_metadata.Deserialize(&pickle_it)) {
|
| + !entry_metadata.Deserialize(
|
| + &pickle_it, index_metadata.has_entry_in_memory_data())) {
|
| LOG(WARNING) << "Invalid EntryMetadata in Simple Index file.";
|
| entries->clear();
|
| return;
|
|
|