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

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

Issue 2780793002: Add extra information for ReadingList ContentSuggestion (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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // ReadingListModelObserver implementation. 51 // ReadingListModelObserver implementation.
52 void ReadingListModelLoaded(const ReadingListModel* model) override; 52 void ReadingListModelLoaded(const ReadingListModel* model) override;
53 void ReadingListModelBeingDeleted(const ReadingListModel* model) override; 53 void ReadingListModelBeingDeleted(const ReadingListModel* model) override;
54 54
55 private: 55 private:
56 // The actual method to fetch Reading List entries. Must be called after the 56 // The actual method to fetch Reading List entries. Must be called after the
57 // model is loaded. 57 // model is loaded.
58 void FetchReadingListInternal(); 58 void FetchReadingListInternal();
59 59
60 // Converts |entry| to ContentSuggestion.
61 ContentSuggestion ConvertEntry(const ReadingListEntry* entry);
62
60 // Updates the |category_status_| and notifies the |observer_|, if necessary. 63 // Updates the |category_status_| and notifies the |observer_|, if necessary.
61 void NotifyStatusChanged(CategoryStatus new_status); 64 void NotifyStatusChanged(CategoryStatus new_status);
62 CategoryStatus category_status_; 65 CategoryStatus category_status_;
63 const Category provided_category_; 66 const Category provided_category_;
64 67
65 ReadingListModel* reading_list_model_; 68 ReadingListModel* reading_list_model_;
66 ScopedObserver<ReadingListModel, ReadingListModelObserver> scoped_observer_; 69 ScopedObserver<ReadingListModel, ReadingListModelObserver> scoped_observer_;
67 70
68 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); 71 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider);
69 }; 72 };
70 73
71 } // namespace ntp_snippets 74 } // namespace ntp_snippets
72 75
73 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_ 76 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698