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

Unified Diff: components/precache/core/precache_fetcher.cc

Issue 2061303003: Precache should cancel when there is user traffic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 years, 6 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
Index: components/precache/core/precache_fetcher.cc
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index dc0d3a272327a9ce1002ba33b377b2abb2f7e058..1cfb7770c4f002446a42c2b3755e40605c36a9c3 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -300,7 +300,7 @@ void PrecacheFetcher::RecordCompletionStatistics(
// If there are resource URLs left to fetch, the last manifest is not yet
// completed.
- if (remaining_resource_urls_to_fetch > 0)
+ if (remaining_resource_urls_to_fetch > 0 && manifests_completed > 0)
bengr 2016/07/06 17:04:27 This seems like it should be a DCHECK. Could you e
Raj 2016/07/06 18:28:23 hmm. I got this failure in a few of my tests. Now
--manifests_completed;
DCHECK_GE(manifests_completed, 0);

Powered by Google App Engine
This is Rietveld 408576698