OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_REMOTE_NTP_SNIPPET_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPET_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPET_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPET_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // base::MakeUnique doesn't work if the ctor is private. | 122 // base::MakeUnique doesn't work if the ctor is private. |
123 static std::unique_ptr<NTPSnippet> MakeUnique( | 123 static std::unique_ptr<NTPSnippet> MakeUnique( |
124 const std::vector<std::string>& ids, int remote_category_id); | 124 const std::vector<std::string>& ids, int remote_category_id); |
125 | 125 |
126 // The first ID in the vector is the primary id. | 126 // The first ID in the vector is the primary id. |
127 std::vector<std::string> ids_; | 127 std::vector<std::string> ids_; |
128 std::string title_; | 128 std::string title_; |
129 GURL url_; | 129 GURL url_; |
130 std::string publisher_name_; | 130 std::string publisher_name_; |
| 131 |
| 132 // TODO(mvanouwerkerk): Remove this field and its uses, just use |url_|. |
131 GURL amp_url_; | 133 GURL amp_url_; |
| 134 |
132 GURL salient_image_url_; | 135 GURL salient_image_url_; |
133 std::string snippet_; | 136 std::string snippet_; |
134 base::Time publish_date_; | 137 base::Time publish_date_; |
135 base::Time expiry_date_; | 138 base::Time expiry_date_; |
136 float score_; | 139 float score_; |
137 bool is_dismissed_; | 140 bool is_dismissed_; |
138 int remote_category_id_; | 141 int remote_category_id_; |
139 | 142 |
140 DISALLOW_COPY_AND_ASSIGN(NTPSnippet); | 143 DISALLOW_COPY_AND_ASSIGN(NTPSnippet); |
141 }; | 144 }; |
142 | 145 |
143 } // namespace ntp_snippets | 146 } // namespace ntp_snippets |
144 | 147 |
145 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPET_H_ | 148 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPET_H_ |
OLD | NEW |