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

Side by Side Diff: components/ntp_snippets/reading_list/reading_list_suggestions_provider.h

Issue 2815623002: ReadingListProvider handles dismissal (Closed)
Patch Set: Address comments Created 3 years, 8 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
« no previous file with comments | « no previous file | components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_snippets/reading_list/reading_list_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698