Index: components/ntp_snippets/content_suggestions_service.h |
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h |
index 8c4a4f75b70e8be5e9f301fec345c1c42f535635..045785f06e5f382762e9e681438e0107143e933b 100644 |
--- a/components/ntp_snippets/content_suggestions_service.h |
+++ b/components/ntp_snippets/content_suggestions_service.h |
@@ -63,12 +63,12 @@ class ContentSuggestionsService : public KeyedService, |
// Fired when a suggestion has been invalidated. The UI must immediately |
// clear the suggestion even from open NTPs. Invalidation happens, for |
// example, when the content that the suggestion refers to is gone. |
- // Note that this event may be fired even if the corresponding |category| is |
+ // Note that this event may be fired even if the corresponding category is |
// not currently AVAILABLE, because open UIs may still be showing the |
// suggestion that is to be removed. This event may also be fired for |
// |suggestion_id|s that never existed and should be ignored in that case. |
- virtual void OnSuggestionInvalidated(Category category, |
- const std::string& suggestion_id) = 0; |
+ virtual void OnSuggestionInvalidated( |
+ const ContentSuggestion::ID& suggestion_id) = 0; |
// Sent when the service is shutting down. After the service has shut down, |
// it will not provide any data anymore, though calling the getters is still |
@@ -114,12 +114,12 @@ class ContentSuggestionsService : public KeyedService, |
// runs the |callback|. If that suggestion doesn't exist or the fetch fails, |
// the callback gets an empty image. The callback will not be called |
// synchronously. |
- void FetchSuggestionImage(const std::string& suggestion_id, |
+ void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, |
const ImageFetchedCallback& callback); |
// Dismisses the suggestion with the given |suggestion_id|, if it exists. |
// This will not trigger an update through the observers. |
- void DismissSuggestion(const std::string& suggestion_id); |
+ void DismissSuggestion(const ContentSuggestion::ID& suggestion_id); |
// Dismisses the given |category|, if it exists. |
// This will not trigger an update through the observers. |
@@ -193,9 +193,9 @@ class ContentSuggestionsService : public KeyedService, |
void OnCategoryStatusChanged(ContentSuggestionsProvider* provider, |
Category category, |
CategoryStatus new_status) override; |
- void OnSuggestionInvalidated(ContentSuggestionsProvider* provider, |
- Category category, |
- const std::string& suggestion_id) override; |
+ void OnSuggestionInvalidated( |
+ ContentSuggestionsProvider* provider, |
+ const ContentSuggestion::ID& suggestion_id) override; |
// history::HistoryServiceObserver implementation. |
void OnURLsDeleted(history::HistoryService* history_service, |
@@ -214,8 +214,7 @@ class ContentSuggestionsService : public KeyedService, |
// Removes a suggestion from the local store |suggestions_by_category_|, if it |
// exists. Returns true if a suggestion was removed. |
- bool RemoveSuggestionByID(Category category, |
- const std::string& suggestion_id); |
+ bool RemoveSuggestionByID(const ContentSuggestion::ID& suggestion_id); |
// Fires the OnCategoryStatusChanged event for the given |category|. |
void NotifyCategoryStatusChanged(Category category); |