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

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

Issue 2560783002: [NTP::PhysicalWeb] Implement suggestion dismissal. (Closed)
Patch Set: rebase and bauerb@ nit. Created 4 years 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 Category category) const; 115 Category category) const;
116 116
117 // Fetches the image for the suggestion with the given |suggestion_id| and 117 // Fetches the image for the suggestion with the given |suggestion_id| and
118 // runs the |callback|. If that suggestion doesn't exist or the fetch fails, 118 // runs the |callback|. If that suggestion doesn't exist or the fetch fails,
119 // the callback gets an empty image. The callback will not be called 119 // the callback gets an empty image. The callback will not be called
120 // synchronously. 120 // synchronously.
121 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, 121 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
122 const ImageFetchedCallback& callback); 122 const ImageFetchedCallback& callback);
123 123
124 // Dismisses the suggestion with the given |suggestion_id|, if it exists. 124 // Dismisses the suggestion with the given |suggestion_id|, if it exists.
125 // This will not trigger an update through the observers. 125 // This will not trigger an update through the observers (i.e. providers must
126 // not call |Observer::OnNewSuggestions|).
126 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id); 127 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id);
127 128
128 // Dismisses the given |category|, if it exists. 129 // Dismisses the given |category|, if it exists.
129 // This will not trigger an update through the observers. 130 // This will not trigger an update through the observers.
130 void DismissCategory(Category category); 131 void DismissCategory(Category category);
131 132
132 // Restores all dismissed categories. 133 // Restores all dismissed categories.
133 // This will not trigger an update through the observers. 134 // This will not trigger an update through the observers.
134 void RestoreDismissedCategories(); 135 void RestoreDismissedCategories();
135 136
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 PrefService* pref_service_; 321 PrefService* pref_service_;
321 322
322 UserClassifier user_classifier_; 323 UserClassifier user_classifier_;
323 324
324 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); 325 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService);
325 }; 326 };
326 327
327 } // namespace ntp_snippets 328 } // namespace ntp_snippets
328 329
329 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 330 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestions_provider.h ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698