Chromium Code Reviews| Index: components/precache/core/precache_fetcher.h |
| diff --git a/components/precache/core/precache_fetcher.h b/components/precache/core/precache_fetcher.h |
| index 927581f46c7cda005468b459921a83ec926f6233..1763dc09cce0f21461d7697aca5ccc49d30d96e3 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" |
|
sclittle
2016/09/14 16:23:28
Where is this file? I can't find it.
Raj
2016/09/14 16:44:34
Done.
|
| #include "net/url_request/url_fetcher.h" |
| #include "net/url_request/url_fetcher_delegate.h" |
| #include "url/gurl.h" |
| @@ -152,6 +153,7 @@ class PrecacheFetcher : public base::SupportsWeakPtr<PrecacheFetcher> { |
| private: |
| friend class PrecacheFetcherTest; |
| FRIEND_TEST_ALL_PREFIXES(PrecacheFetcherTest, FetcherPoolMaxLimitReached); |
| + FRIEND_TEST_ALL_PREFIXES(PrecacheFetcherTest, DailyQuota); |
| // Notifies the precache delete that precaching is done, and report |
| // completion statistics. |
| @@ -190,6 +192,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_; |
| @@ -215,6 +220,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_; |