Chromium Code Reviews| Index: components/offline_pages/core/prefetch/prefetch_service.h |
| diff --git a/components/offline_pages/core/prefetch/prefetch_service.h b/components/offline_pages/core/prefetch/prefetch_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c7e361078852064aee89f7f4f6872da013f07463 |
| --- /dev/null |
| +++ b/components/offline_pages/core/prefetch/prefetch_service.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ |
| +#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ |
| + |
| +#include "components/keyed_service/core/keyed_service.h" |
| + |
| +class GURL; |
| + |
| +namespace offline_pages { |
| + |
| +class PrefetchService : public KeyedService { |
|
carlosk
2017/04/11 17:31:36
Please add a comment explaining what this class re
dewittj
2017/04/11 21:25:49
Done.
|
| + public: |
| + ~PrefetchService() override = default; |
| + |
| + // This will be called by OfflinePageSuggestionsObserver when suggestions |
|
carlosk
2017/04/11 17:31:36
nit: the potential caller should not be mentioned
dewittj
2017/04/11 21:25:48
Done.
|
| + // that are not already saved into the OfflinePageModel are provided. |
| + virtual void OnNewURLSuggestions(std::vector<GURL> suggested_urls) = 0; |
|
Dmitry Titov
2017/04/11 01:17:14
Not a request, but for consideration: Lets say at
dewittj
2017/04/11 21:25:49
Done.
|
| + |
| + // This will be called when all existing suggestions are no longer considered |
| + // valid. The prefetch service should remove any suggestions that have not |
| + // yet started downloading. |
| + virtual void RemoveAllUnprocessedURLSuggestions() = 0; |
| +}; |
| + |
| +} // namespace offline_pages |
| + |
| +#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ |