Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _ | |
|
Marc Treib
2017/03/17 14:44:01
include guard doesn't match the folder
gambard
2017/03/20 08:32:40
Done.
| |
| 6 #define COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _ | |
| 7 | |
| 8 #include "components/ntp_snippets/content_suggestions_provider.h" | |
|
Marc Treib
2017/03/17 14:44:01
nit: Some includes missing, e.g. for ContentSugges
gambard
2017/03/20 08:32:40
Done.
| |
| 9 #include "components/reading_list/ios/reading_list_model_observer.h" | |
|
Marc Treib
2017/03/17 14:44:01
Ah, this is probably what makes the ios/ subfolder
gambard
2017/03/20 08:32:40
See the other comment.
| |
| 10 | |
| 11 class ReadingListModel; | |
| 12 | |
| 13 namespace ntp_snippets { | |
| 14 | |
| 15 // Provides content suggestions from the Reading List. | |
| 16 class ReadingListSuggestionsProvider : public ContentSuggestionsProvider, | |
| 17 public ReadingListModelObserver { | |
| 18 public: | |
| 19 ReadingListSuggestionsProvider(ContentSuggestionsProvider::Observer* observer, | |
| 20 ReadingListModel* reading_list_model); | |
| 21 | |
| 22 private: | |
| 23 // ContentSuggestionsProvider implementation. | |
| 24 CategoryStatus GetCategoryStatus(Category category) override; | |
| 25 CategoryInfo GetCategoryInfo(Category category) override; | |
| 26 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; | |
| 27 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, | |
| 28 const ImageFetchedCallback& callback) override; | |
| 29 void Fetch(const Category& category, | |
| 30 const std::set<std::string>& known_suggestion_ids, | |
| 31 const FetchDoneCallback& callback) override; | |
| 32 void ClearHistory( | |
| 33 base::Time begin, | |
| 34 base::Time end, | |
| 35 const base::Callback<bool(const GURL& url)>& filter) override; | |
| 36 void ClearCachedSuggestions(Category category) override; | |
| 37 void GetDismissedSuggestionsForDebugging( | |
| 38 Category category, | |
| 39 const DismissedSuggestionsCallback& callback) override; | |
| 40 void ClearDismissedSuggestionsForDebugging(Category category) override; | |
| 41 | |
| 42 // ReadingListModelObserver implementation. | |
| 43 void ReadingListModelLoaded(const ReadingListModel* model) override; | |
| 44 | |
| 45 void FetchReadingListInternal(); | |
| 46 | |
| 47 CategoryStatus category_status_; | |
| 48 const Category provided_category_; | |
| 49 | |
| 50 ReadingListModel* reading_list_model_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); | |
| 53 }; | |
| 54 | |
| 55 } // namespace ntp_snippets | |
| 56 | |
| 57 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_ | |
| OLD | NEW |