summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/eviction.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 21:19:02 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 21:19:02 +0000
commit190be391c2c420310d95eda78b5fce0e00d069bf (patch)
treebb7921b70100dac4401c7a68ba3a3e6c7d6d5d36 /net/disk_cache/eviction.cc
parent027f2fb27b6c2840feb15a3ee8964473075122bb (diff)
downloadchromium_src-190be391c2c420310d95eda78b5fce0e00d069bf.zip
chromium_src-190be391c2c420310d95eda78b5fce0e00d069bf.tar.gz
chromium_src-190be391c2c420310d95eda78b5fce0e00d069bf.tar.bz2
Disk cache: Report more info from the current experiment.
BUG=none TEST=none Review URL: http://codereview.chromium.org/119218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/eviction.cc')
-rw-r--r--net/disk_cache/eviction.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/eviction.cc
index dab707d..cae5702 100644
--- a/net/disk_cache/eviction.cc
+++ b/net/disk_cache/eviction.cc
@@ -146,10 +146,22 @@ void Eviction::ReportTrimTimes(EntryImpl* entry) {
ReportListStats();
}
- if (header_->create_time && !header_->lru.filled) {
+ if (header_->lru.filled)
+ return;
+
+ header_->lru.filled = 1;
+
+ if (header_->create_time) {
// This is the first entry that we have to evict, generate some noise.
- header_->lru.filled = 1;
backend_->FirstEviction();
+ } else {
+ // This is an old file, but we may want more reports from this user so
+ // lets save some create_time.
+ Time::Exploded old = {0};
+ old.year = 2009;
+ old.month = 3;
+ old.day_of_month = 1;
+ header_->create_time = Time::FromLocalExploded(old).ToInternalValue();
}
}
}