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

Unified Diff: chrome/browser/browsing_data/cache_counter.cc

Issue 1420013004: Polish the result communication and display of the browsing data counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 1 month 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
Index: chrome/browser/browsing_data/cache_counter.cc
diff --git a/chrome/browser/browsing_data/cache_counter.cc b/chrome/browser/browsing_data/cache_counter.cc
index 299ed1efb2d81041e328b2f368b3f6a86b4006cc..06f4cd6a342f9ad3103ffb67c3df7b84e99c22e7 100644
--- a/chrome/browser/browsing_data/cache_counter.cc
+++ b/chrome/browser/browsing_data/cache_counter.cc
@@ -40,15 +40,7 @@ void CacheCounter::OnCacheSizeCalculated(int64 result_bytes) {
if (result_bytes < 0)
return;
- // The cache size on all three backends (blockfile, simple and memory) is
- // limited to int32. We are adding together results from several cache
- // backends, so the result should fit into 32+epsilon bits. Thus,
- // |result_bytes| / 1024^2 should fit into an int.
- static const int kBToMb = 1024 * 1024;
- int result_mb = result_bytes / kBToMb;
- if (result_bytes % kBToMb)
- ++result_mb;
- ReportResult(result_mb);
+ ReportResult(result_bytes);
}
bool CacheCounter::Pending() {
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter.cc ('k') | chrome/browser/browsing_data/cache_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698