summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-12 23:51:25 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-12 23:51:25 +0000
commit269cf86aa4ebc523a869a9a68535e5e9a7f358f8 (patch)
tree8496010628c50b604198a47515dd61971ba95c91 /net
parente69702358e63b75bdbc5bd6057ddebc48d1cc593 (diff)
downloadchromium_src-269cf86aa4ebc523a869a9a68535e5e9a7f358f8.zip
chromium_src-269cf86aa4ebc523a869a9a68535e5e9a7f358f8.tar.gz
chromium_src-269cf86aa4ebc523a869a9a68535e5e9a7f358f8.tar.bz2
Set the disk cache file version properly if new_eviction
is set. BUG=none TEST=none Review URL: http://codereview.chromium.org/115271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/disk_cache/backend_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 28d875a..e997b90 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -887,6 +887,11 @@ bool BackendImpl::CreateBackingStore(disk_cache::File* file) {
IndexHeader header;
header.table_len = DesiredIndexTableLen(max_size_);
+
+ // We need file version 2.1 for the new eviction algorithm.
+ if (new_eviction_)
+ header.version = 0x20001;
+
header.create_time = Time::Now().ToInternalValue();
if (!file->Write(&header, sizeof(header), 0))