| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H
_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H
_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H
_ | 6 #define COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H
_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 private: | 58 private: |
| 59 // The actual method to fetch Reading List entries. Must be called after the | 59 // The actual method to fetch Reading List entries. Must be called after the |
| 60 // model is loaded. | 60 // model is loaded. |
| 61 void FetchReadingListInternal(); | 61 void FetchReadingListInternal(); |
| 62 | 62 |
| 63 // Converts |entry| to ContentSuggestion. | 63 // Converts |entry| to ContentSuggestion. |
| 64 ContentSuggestion ConvertEntry(const ReadingListEntry* entry); | 64 ContentSuggestion ConvertEntry(const ReadingListEntry* entry); |
| 65 | 65 |
| 66 // Updates the |category_status_| and notifies the |observer_|, if necessary. | 66 // Updates the |category_status_| and notifies the |observer_|, if necessary. |
| 67 void NotifyStatusChanged(CategoryStatus new_status); | 67 void NotifyStatusChanged(CategoryStatus new_status); |
| 68 |
| 69 // Sets the dismissed status of the entry to |dismissed|. |
| 70 void SetDismissedState(const GURL& url, bool dismissed); |
| 71 |
| 68 CategoryStatus category_status_; | 72 CategoryStatus category_status_; |
| 69 const Category provided_category_; | 73 const Category provided_category_; |
| 70 | 74 |
| 71 ReadingListModel* reading_list_model_; | 75 ReadingListModel* reading_list_model_; |
| 72 ScopedObserver<ReadingListModel, ReadingListModelObserver> scoped_observer_; | 76 ScopedObserver<ReadingListModel, ReadingListModelObserver> scoped_observer_; |
| 73 | 77 |
| 74 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); | 78 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); |
| 75 }; | 79 }; |
| 76 | 80 |
| 77 } // namespace ntp_snippets | 81 } // namespace ntp_snippets |
| 78 | 82 |
| 79 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE
R_H_ | 83 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE
R_H_ |
| OLD | NEW |