Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Unified Diff: net/disk_cache/eviction.cc

Issue 49027: Disk cache: First pass to make it possible to have... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/eviction.h ('k') | net/disk_cache/stress_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/eviction.cc
===================================================================
--- net/disk_cache/eviction.cc (revision 12517)
+++ net/disk_cache/eviction.cc (working copy)
@@ -67,6 +67,7 @@
header_ = &backend_->data_->header;
max_size_ = LowWaterAdjust(backend_->max_size_);
new_eviction_ = backend->new_eviction_;
+ first_trim_ = true;
}
void Eviction::TrimCache(bool empty) {
@@ -141,9 +142,8 @@
}
void Eviction::ReportTrimTimes(EntryImpl* entry) {
- static bool first_time = true;
- if (first_time) {
- first_time = false;
+ if (first_trim_) {
+ first_trim_ = false;
if (backend_->ShouldReportAgain()) {
std::string name(StringPrintf("DiskCache.TrimAge_%d",
header_->experiment));
« no previous file with comments | « net/disk_cache/eviction.h ('k') | net/disk_cache/stress_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698