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

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

Issue 2663183002: [NTP::Cleanup] Store tab id as int in SnippetArticle. (Closed)
Patch Set: clean rebase. Created 3 years, 10 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 20 matching lines...) Expand all
31 int64_t offline_page_id = 0; 31 int64_t offline_page_id = 0;
32 // Whether or not the download suggestion is a downloaded asset. 32 // Whether or not the download suggestion is a downloaded asset.
33 // When this is true, |offline_page_id| is ignored, otherwise 33 // When this is true, |offline_page_id| is ignored, otherwise
34 // |target_file_path| and |mime_type| are ignored. 34 // |target_file_path| and |mime_type| are ignored.
35 bool is_download_asset = false; 35 bool is_download_asset = false;
36 }; 36 };
37 37
38 // Contains additional data which is only available for recent tab suggestions. 38 // Contains additional data which is only available for recent tab suggestions.
39 struct RecentTabSuggestionExtra { 39 struct RecentTabSuggestionExtra {
40 // Corresponding tab identifier. 40 // Corresponding tab identifier.
41 std::string tab_id; 41 int tab_id;
42 // Underlying offline page identifier. 42 // Underlying offline page identifier.
43 int64_t offline_page_id = 0; 43 int64_t offline_page_id = 0;
44 }; 44 };
45 45
46 // Contains additional data for notification-worthy suggestions. 46 // Contains additional data for notification-worthy suggestions.
47 struct NotificationExtra { 47 struct NotificationExtra {
48 // Deadline for showing notification. If the deadline is past, the 48 // Deadline for showing notification. If the deadline is past, the
49 // notification is no longer fresh and no notification should be sent. If the 49 // notification is no longer fresh and no notification should be sent. If the
50 // deadline passes while a notification is up, it should be canceled. 50 // deadline passes while a notification is up, it should be canceled.
51 base::Time deadline; 51 base::Time deadline;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 std::unique_ptr<NotificationExtra> notification_extra_; 164 std::unique_ptr<NotificationExtra> notification_extra_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion); 166 DISALLOW_COPY_AND_ASSIGN(ContentSuggestion);
167 }; 167 };
168 168
169 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id); 169 std::ostream& operator<<(std::ostream& os, const ContentSuggestion::ID& id);
170 170
171 } // namespace ntp_snippets 171 } // namespace ntp_snippets
172 172
173 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_ 173 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698