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

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: minor fix 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
« no previous file with comments | « components/precache/content/precache_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/precache_fetcher.cc
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index 7b567611a4958b6112072dcc822f81d6437f71a6..379774aebbd97e08b5d78faebb007d24cbc0c155 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -296,7 +296,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)
Raj 2016/06/14 21:35:16 This additional check fixes a possible DCHECK fail
--manifests_completed;
DCHECK_GE(manifests_completed, 0);
« no previous file with comments | « components/precache/content/precache_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698