Index: components/precache/core/precache_fetcher.h |
diff --git a/components/precache/core/precache_fetcher.h b/components/precache/core/precache_fetcher.h |
index 3c6f9e6e612ebf6e7c982147b0fc36ea722d6aa4..adfdb8f022a4bf1c48e1a51e031243d9d4c46e39 100644 |
--- a/components/precache/core/precache_fetcher.h |
+++ b/components/precache/core/precache_fetcher.h |
@@ -19,6 +19,7 @@ |
#include "base/single_thread_task_runner.h" |
#include "base/time/time.h" |
#include "components/precache/core/fetcher_pool.h" |
+#include "components/precache/core/proto/quota.pb.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_fetcher_delegate.h" |
#include "url/gurl.h" |
@@ -154,6 +155,7 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> { |
FRIEND_TEST_ALL_PREFIXES(PrecacheFetcherTest, FetcherPoolMaxLimitReached); |
FRIEND_TEST_ALL_PREFIXES(PrecacheFetcherTest, |
CancelPrecachingAfterAllManifestFetch); |
+ FRIEND_TEST_ALL_PREFIXES(PrecacheFetcherTest, DailyQuota); |
// Notifies the precache delete that precaching is done, and report |
// completion statistics. |
@@ -192,6 +194,9 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> { |
// Callback invoked when the manifest info for all the top hosts is retrieved. |
void OnManifestInfoRetrieved(std::deque<ManifestHostInfo> manifests_info); |
+ // Callback invoked when the quota is retrieved. |
+ void OnQuotaInfoRetrieved(const PrecacheQuota& quota); |
+ |
// The request context used when fetching URLs. |
const scoped_refptr<net::URLRequestContextGetter> request_context_; |
@@ -217,6 +222,9 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> { |
std::unique_ptr<PrecacheUnfinishedWork> unfinished_work_; |
+ // Daily quota. |
+ PrecacheQuota quota_; |
+ |
// The fieldtrial experiment ID. |
uint32_t experiment_id_; |