summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 19:24:48 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-04 19:24:48 +0000
commit00509dbbd9762b409c94f07860bd20dad7063fa0 (patch)
treec469a63f3bfea0512e1532b78113cd0be27960e7 /net/disk_cache
parent5e6a4c38976d079ff33ec6d428c2a6802eb01aa7 (diff)
downloadchromium_src-00509dbbd9762b409c94f07860bd20dad7063fa0.zip
chromium_src-00509dbbd9762b409c94f07860bd20dad7063fa0.tar.gz
chromium_src-00509dbbd9762b409c94f07860bd20dad7063fa0.tar.bz2
Disk cache: Reset the number of fatal errors each time
we report it and make sure that we don't report it more than once a week. BUG=none TEST=none Review URL: http://codereview.chromium.org/6410044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-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 0a6ad778..01c0136 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -1470,6 +1470,7 @@ void BackendImpl::RestartCache(bool failure) {
int64 errors = stats_.GetCounter(Stats::FATAL_ERROR);
int64 full_dooms = stats_.GetCounter(Stats::DOOM_CACHE);
int64 partial_dooms = stats_.GetCounter(Stats::DOOM_RECENT);
+ int64 last_report = stats_.GetCounter(Stats::LAST_REPORT);
PrepareForRestart();
if (failure) {
@@ -1488,6 +1489,7 @@ void BackendImpl::RestartCache(bool failure) {
stats_.SetCounter(Stats::FATAL_ERROR, errors);
stats_.SetCounter(Stats::DOOM_CACHE, full_dooms);
stats_.SetCounter(Stats::DOOM_RECENT, partial_dooms);
+ stats_.SetCounter(Stats::LAST_REPORT, last_report);
}
}
@@ -1934,6 +1936,9 @@ void BackendImpl::ReportStats() {
static_cast<int>(stats_.GetCounter(Stats::DOOM_CACHE)));
CACHE_UMA(COUNTS_10000, "TotalDoomRecentEntries", 0,
static_cast<int>(stats_.GetCounter(Stats::DOOM_RECENT)));
+ stats_.SetCounter(Stats::FATAL_ERROR, 0);
+ stats_.SetCounter(Stats::DOOM_CACHE, 0);
+ stats_.SetCounter(Stats::DOOM_RECENT, 0);
int64 total_hours = stats_.GetCounter(Stats::TIMER) / 120;
if (!data_->header.create_time || !data_->header.lru.filled) {