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

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

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: Addressed comments 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.h
diff --git a/components/precache/core/precache_fetcher.h b/components/precache/core/precache_fetcher.h
index d6c3fa416de693070e9605100bb8e6a027b4842f..a6b6c2dc6f64657f919fc04ba4973a6e79dcdb86 100644
--- a/components/precache/core/precache_fetcher.h
+++ b/components/precache/core/precache_fetcher.h
@@ -39,6 +39,10 @@ class PrecacheUnfinishedWork;
// Visible for testing.
extern const int kNoTracking;
+// Returns the maximum number of URLFetcher requests that can be on flight in
+// parallel.
+extern int GetDefaultMaxParallelFetches();
+
// Public interface to code that fetches resources that the user is likely to
// want to fetch in the future, putting them in the network stack disk cache.
// Precaching is intended to be done when Chrome is not actively in use, likely
@@ -124,6 +128,8 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> {
std::unique_ptr<PrecacheUnfinishedWork> CancelPrecaching();
private:
+ friend class PrecacheFetcherTest;
+
// Notifies the precache delete that precaching is done, and report
// completion statistics.
void NotifyDone(size_t remaining_manifest_urls_to_fetch,
« no previous file with comments | « no previous file | components/precache/core/precache_fetcher.cc » ('j') | components/precache/core/precache_fetcher_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698