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

Side by Side Diff: components/ntp_snippets/remote/ntp_snippet.h

Issue 2593573003: Ntp: use AMP urls for content suggestions when available. (Closed)
Patch Set: Address review comments by vitalii. Created 4 years 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 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
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_
OLDNEW
« no previous file with comments | « components/ntp_snippets/features.cc ('k') | components/ntp_snippets/remote/remote_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698