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

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

Issue 2037903002: Precache manifest should not be added to fetcher pool which is full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 eb9aeba0a15504b0b22cd635a144f74766f478f2..875e3e9515ad38f6037d3d7088e6443717ae2362 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -399,14 +399,11 @@ void PrecacheFetcher::StartNextResourceFetch() {
}
void PrecacheFetcher::StartNextManifestFetch() {
- if (manifest_urls_to_fetch_.empty())
+ if (manifest_urls_to_fetch_.empty() || !pool_.IsAvailable())
bengr 2016/06/06 18:55:15 Could you add a test that tries to precache more r
Raj 2016/06/08 03:10:42 Done.
return;
// We only fetch one manifest at a time to keep the size of
// resource_urls_to_fetch_ as small as possible.
- DCHECK(pool_.IsAvailable())
- << "There are no available parallel requests to fetch the next manifest. "
- "Did you forget to call Delete?";
VLOG(3) << "Fetching " << manifest_urls_to_fetch_.front();
pool_.Add(base::WrapUnique(new Fetcher(
request_context_.get(), manifest_urls_to_fetch_.front(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698