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

Unified Diff: components/offline_pages/core/prefetch/prefetch_service.h

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Move Content Suggestions Observer to //components/offline_pages/core and modify lifetime management Created 3 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
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
index 057d9f03a9cb764d8a215a249df8d76af9d06949..657b8ffa204b4eea4b63654af6afc3202f8ab1f3 100644
--- a/components/offline_pages/core/prefetch/prefetch_service.h
+++ b/components/offline_pages/core/prefetch/prefetch_service.h
@@ -10,6 +10,10 @@
class GURL;
+namespace ntp_snippets {
+class ContentSuggestionsService;
+}
+
namespace offline_pages {
// Main class for the Offline Pages Prefetching feature, which will ask a server
@@ -42,6 +46,11 @@ class PrefetchService : public KeyedService {
~PrefetchService() override = default;
+ // Called at construction of the ContentSuggestionsService to begin observing
+ // events related to incoming articles.
+ virtual void ObserveContentSuggestionsService(
+ ntp_snippets::ContentSuggestionsService* service) = 0;
+
// Called when a consumer has candidate URLs for the system to prefetch.
// Duplicates are accepted by the PrefetchService but ignored.
virtual void AddCandidatePrefetchURLs(

Powered by Google App Engine
This is Rietveld 408576698