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

Side by Side Diff: components/ntp_snippets/content_suggestion.h

Issue 2865183003: Use the same design for all suggestions (Closed)
Patch Set: Address comments Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CONTENT_SUGGESTION_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 struct RecentTabSuggestionExtra { 42 struct RecentTabSuggestionExtra {
43 // Corresponding tab identifier. 43 // Corresponding tab identifier.
44 int tab_id; 44 int tab_id;
45 // Underlying offline page identifier. 45 // Underlying offline page identifier.
46 int64_t offline_page_id = 0; 46 int64_t offline_page_id = 0;
47 }; 47 };
48 48
49 // ReadingListSuggestionExtra contains additional data which is only available 49 // ReadingListSuggestionExtra contains additional data which is only available
50 // for Reading List suggestions. 50 // for Reading List suggestions.
51 struct ReadingListSuggestionExtra { 51 struct ReadingListSuggestionExtra {
52 // State of the distillation a suggestion. This is the meaningful extract of
53 // ReadingListEntry::DistillationState for the suggestions. It is duplicated
54 // here to avoid a dependence on ReadingList.
55 enum class ReadingListSuggestionDistilledState { PENDING, SUCCESS, FAILURE };
56
57 // State of the distillation of the suggestion. 52 // State of the distillation of the suggestion.
58 ReadingListSuggestionDistilledState distilled_state = 53 bool distilled = false;
59 ReadingListSuggestionDistilledState::PENDING;
60 // URL of the page whose favicon should be displayed for this suggestion. 54 // URL of the page whose favicon should be displayed for this suggestion.
61 GURL favicon_page_url; 55 GURL favicon_page_url;
62 }; 56 };
63 57
64 // Contains additional data for notification-worthy suggestions. 58 // Contains additional data for notification-worthy suggestions.
65 struct NotificationExtra { 59 struct NotificationExtra {
66 // Deadline for showing notification. If the deadline is past, the 60 // Deadline for showing notification. If the deadline is past, the
67 // notification is no longer fresh and no notification should be sent. If the 61 // notification is no longer fresh and no notification should be sent. If the
68 // deadline passes while a notification is up, it should be canceled. 62 // deadline passes while a notification is up, it should be canceled.
69 base::Time deadline; 63 base::Time deadline;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 base::Time fetch_date_; 210 base::Time fetch_date_;
217 211
218 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); 212 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion);
219 }; 213 };
220 214
221 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); 215 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id);
222 216
223 } // namespace ntp_snippets 217 } // namespace ntp_snippets
224 218
225 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ 219 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/BUILD.gn ('k') | components/ntp_snippets/reading_list/reading_list_distillation_state_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698