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

Side by Side Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2421463002: FetchMore functionality backend (Closed)
Patch Set: Strategy pattern to handle differences in fetching procedure. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id); 122 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id);
123 123
124 // Dismisses the given |category|, if it exists. 124 // Dismisses the given |category|, if it exists.
125 // This will not trigger an update through the observers. 125 // This will not trigger an update through the observers.
126 void DismissCategory(Category category); 126 void DismissCategory(Category category);
127 127
128 // Restores all dismissed categories. 128 // Restores all dismissed categories.
129 // This will not trigger an update through the observers. 129 // This will not trigger an update through the observers.
130 void RestoreDismissedCategories(); 130 void RestoreDismissedCategories();
131 131
132 // Manually triggers the provider of the category to fetch content that is not
133 // already loaded.
Marc Treib 2016/10/18 08:17:45 This shouldn't talk about providers - users of thi
fhorschig 2016/10/20 13:10:38 Done.
134 void FetchMore(Category category) ;
135
132 // Observer accessors. 136 // Observer accessors.
133 void AddObserver(Observer* observer); 137 void AddObserver(Observer* observer);
134 void RemoveObserver(Observer* observer); 138 void RemoveObserver(Observer* observer);
135 139
136 // Registers a new ContentSuggestionsProvider. It must be ensured that at most 140 // Registers a new ContentSuggestionsProvider. It must be ensured that at most
137 // one provider is registered for every category and that this method is 141 // one provider is registered for every category and that this method is
138 // called only once per provider. 142 // called only once per provider.
139 void RegisterProvider(std::unique_ptr<ContentSuggestionsProvider> provider); 143 void RegisterProvider(std::unique_ptr<ContentSuggestionsProvider> provider);
140 144
141 // Removes history from the specified time range where the URL matches the 145 // Removes history from the specified time range where the URL matches the
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 NTPSnippetsService* ntp_snippets_service_; 277 NTPSnippetsService* ntp_snippets_service_;
274 278
275 UserClassifier user_classifier_; 279 UserClassifier user_classifier_;
276 280
277 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); 281 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService);
278 }; 282 };
279 283
280 } // namespace ntp_snippets 284 } // namespace ntp_snippets
281 285
282 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 286 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698