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

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: Add 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // ReadingListModelObserver implementation. 50 // ReadingListModelObserver implementation.
51 void ReadingListModelLoaded(const ReadingListModel* model) override; 51 void ReadingListModelLoaded(const ReadingListModel* model) override;
52 void ReadingListModelBeingDeleted(const ReadingListModel* model) override; 52 void ReadingListModelBeingDeleted(const ReadingListModel* model) override;
53 53
54 private: 54 private:
55 // The actual method to fetch Reading List entries. Must be called after the 55 // The actual method to fetch Reading List entries. Must be called after the
56 // model is loaded. 56 // model is loaded.
57 void FetchReadingListInternal(); 57 void FetchReadingListInternal();
58 58
59 // Converts |entry| to ContentSuggestion and add it to |suggestions|.
Olivier 2017/03/28 13:43:46 nit: The main goal of the method is to add the ent
gambard 2017/03/29 06:51:24 Done.
60 void ConvertEntry(const ReadingListEntry* entry,
Olivier 2017/03/28 13:43:46 const & ?
gambard 2017/03/29 06:51:24 I have a pointer (returned by the Reading List mod
Marc Treib 2017/03/29 08:24:58 But you can still pass a reference here, to make c
61 std::vector<ContentSuggestion>* suggestions);
62
59 // Updates the |category_status_| and notifies the |observer_|, if necessary. 63 // Updates the |category_status_| and notifies the |observer_|, if necessary.
60 void NotifyStatusChanged(CategoryStatus new_status); 64 void NotifyStatusChanged(CategoryStatus new_status);
61 CategoryStatus category_status_; 65 CategoryStatus category_status_;
62 const Category provided_category_; 66 const Category provided_category_;
63 67
64 ReadingListModel* reading_list_model_; 68 ReadingListModel* reading_list_model_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); 70 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider);
67 }; 71 };
68 72
69 } // namespace ntp_snippets 73 } // namespace ntp_snippets
70 74
71 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_ 75 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698