diff options
author | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 17:15:20 +0000 |
---|---|---|
committer | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 17:15:20 +0000 |
commit | 7aadbac8540b9a83477b4487f5fb4ae1ed936d46 (patch) | |
tree | 319d9c3d6a9a8dd8b3444e9b3b132041ec439a87 /net/disk_cache | |
parent | 83afbe304dd20c08776b0d947719e14ad83c381d (diff) | |
download | chromium_src-7aadbac8540b9a83477b4487f5fb4ae1ed936d46.zip chromium_src-7aadbac8540b9a83477b4487f5fb4ae1ed936d46.tar.gz chromium_src-7aadbac8540b9a83477b4487f5fb4ae1ed936d46.tar.bz2 |
Some minor nits in backend_impl.cc
In http://codereview.chromium.org/10834361 , I committed without addressing
some nits from the review. This CL just chases those.
R=rvargas@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10876088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 71d4168..ffbe1f5 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -2026,15 +2026,15 @@ void BackendImpl::ReportStats() { return; CACHE_UMA(HOURS, "UseTime", 0, static_cast<int>(use_hours)); - const int hit_percentage = stats_.GetHitRatio(); - CACHE_UMA(PERCENTAGE, "HitRatio", 0, hit_percentage); + int hit_ratio_as_percentage = stats_.GetHitRatio(); + CACHE_UMA(PERCENTAGE, "HitRatio", 0, hit_ratio_as_percentage); // For any bin in HitRatioByTotalTime, the HitRatio of caches of that age is // approximately the value of HitRatioByTotalTime / TotalTime. Likewise for // HitRatioByUseTime. - if (base::RandInt(0, 99) < hit_percentage) + if (base::RandInt(0, 99) < hit_ratio_as_percentage) CACHE_UMA(HOURS, "HitRatioByTotalTime", 0, implicit_cast<int>(total_hours)); - if (base::RandInt(0, 99) < hit_percentage) + if (base::RandInt(0, 99) < hit_ratio_as_percentage) CACHE_UMA(HOURS, "HitRatioByUseTime", 0, implicit_cast<int>(use_hours)); int64 trim_rate = stats_.GetCounter(Stats::TRIM_ENTRY) / use_hours; |