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

Unified Diff: components/ntp_snippets/ntp_snippet.h

Issue 1922083004: Allow fetching personalized snippets from ChromeReader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another unittest fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_snippets/DEPS ('k') | components/ntp_snippets/ntp_snippet.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippet.h
diff --git a/components/ntp_snippets/ntp_snippet.h b/components/ntp_snippets/ntp_snippet.h
index 6b1f6ee0b82f193fe2691dd78275d305061ca4dc..5c95d6f0141c790fb2e3ebc626cb7c1c8d542018 100644
--- a/components/ntp_snippets/ntp_snippet.h
+++ b/components/ntp_snippets/ntp_snippet.h
@@ -108,6 +108,9 @@ class NTPSnippet {
!best_source().publisher_name.empty();
}
+ float score() const { return score_; }
+ void set_score(float score) { score_ = score; }
+
// Public for testing.
static base::Time TimeFromJsonString(const std::string& timestamp_str);
static std::string TimeToJsonString(const base::Time& time);
@@ -120,6 +123,7 @@ class NTPSnippet {
base::Time publish_date_;
base::Time expiry_date_;
GURL amp_url_;
+ float score_;
size_t best_source_index_;
std::vector<SnippetSource> sources_;
« no previous file with comments | « components/ntp_snippets/DEPS ('k') | components/ntp_snippets/ntp_snippet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698