Chromium Code Reviews| Index: components/precache/core/precache_fetcher.cc |
| diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc |
| index bab9bc580b1bc06ae111b212dc253cf0e62cdcf1..1cbf787acf2612f45b6c2dcd80a7d371a61c03d6 100644 |
| --- a/components/precache/core/precache_fetcher.cc |
| +++ b/components/precache/core/precache_fetcher.cc |
| @@ -718,6 +718,12 @@ void PrecacheFetcher::OnQuotaInfoRetrieved(const PrecacheQuota& quota) { |
| quota_ = quota; |
| base::Time time_now = base::Time::Now(); |
| if (IsQuotaTimeExpired(quota_, time_now)) { |
| + UMA_HISTOGRAM_CUSTOM_COUNTS( |
| + "Precache.Fetch.ResponseBytes.Daily", |
| + unfinished_work_->config_settings().daily_quota_total() - |
| + quota_.remaining(), |
|
jamartin
2017/03/07 21:10:12
(opt) It would be nice to have a bit more document
twifkak
2017/03/07 21:45:09
Done.
|
| + 1, kMaxResponseBytes, 100); |
|
jamartin
2017/03/07 21:10:12
I assume you eyeballed the bucket values and they
twifkak
2017/03/07 21:45:09
Yes. The max is 500MB, which is more than enough f
|
| + |
| // This is a new day. Update daily quota, that starts today and expires by |
| // end of today. |
|
jamartin
2017/03/07 21:10:12
Keep the comment at the beginning of the if block.
twifkak
2017/03/07 21:45:09
Done.
|
| quota_.set_start_time(time_now.LocalMidnight().ToInternalValue()); |