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

Issue 2686063003: [remote suggestions] Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle (Closed)

Created:
3 years, 10 months ago by markusheintz_
Modified:
3 years, 10 months ago
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org, Sami
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[remote suggestions] Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle and use it for calculating metrics. This allows to mix suggestions from multiples background fetches on the fly while still beeing able to compute currect freshness metrics for each individual snippet. BUG=690514 Review-Url: https://codereview.chromium.org/2686063003 Cr-Commit-Position: refs/heads/master@{#450692} Committed: https://chromium.googlesource.com/chromium/src/+/05b1e88e39e1f54d14a3cc272be365ef203ea18f

Patch Set 1 #

Patch Set 2 : Update comments #

Total comments: 17

Patch Set 3 : Address comments (execpt the time related once) #

Patch Set 4 : Address time related comments #

Total comments: 4

Patch Set 5 : Replace TickClock with Clock und use only a single clock instance for any time related tasks. #

Patch Set 6 : Update RemoteSuggestionTest #

Total comments: 10

Patch Set 7 : Fix android tests #

Patch Set 8 : Address comments #

Patch Set 9 : rebase #

Total comments: 1

Patch Set 10 : Addresse comment treib@ #

Total comments: 6

Patch Set 11 : Address comments #

Patch Set 12 : Fix test after reording params in a method #

Patch Set 13 : rebase #

Patch Set 14 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -129 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java View 1 2 3 4 5 6 7 2 chunks +10 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -8 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -10 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/suggestions/ContentSuggestionsTestUtils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_snippets/content_suggestion.h View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_metrics.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M components/ntp_snippets/content_suggestions_metrics.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -4 lines 0 comments Download
M components/ntp_snippets/content_suggestions_metrics_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -10 lines 0 comments Download
M components/ntp_snippets/remote/json_request.h View 1 2 3 4 5 6 7 6 chunks +9 lines, -8 lines 0 comments Download
M components/ntp_snippets/remote/json_request.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -12 lines 0 comments Download
M components/ntp_snippets/remote/json_request_unittest.cc View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M components/ntp_snippets/remote/proto/ntp_snippets.proto View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestion.h View 1 2 3 4 3 chunks +9 lines, -2 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestion.cc View 1 2 8 chunks +15 lines, -2 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestion_unittest.cc View 1 2 3 4 5 6 7 23 chunks +66 lines, -32 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_fetcher.h View 1 2 3 4 4 chunks +7 lines, -5 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_fetcher.cc View 1 2 3 4 12 chunks +31 lines, -20 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 88 (48 generated)
markusheintz_
Update comments
3 years, 10 months ago (2017-02-10 13:37:27 UTC) #6
markusheintz_
PTAL
3 years, 10 months ago (2017-02-10 16:06:56 UTC) #9
jkrcal
Quick comment: I am not happy to move data to UI that it does not ...
3 years, 10 months ago (2017-02-10 16:14:42 UTC) #10
Marc Treib
Please add a title line to the description https://codereview.chromium.org/2686063003/diff/20001/components/ntp_snippets/content_suggestion.h File components/ntp_snippets/content_suggestion.h (right): https://codereview.chromium.org/2686063003/diff/20001/components/ntp_snippets/content_suggestion.h#newcode171 components/ntp_snippets/content_suggestion.h:171: // ...
3 years, 10 months ago (2017-02-10 16:16:56 UTC) #11
markusheintz_
Address comments (execpt the time related once)
3 years, 10 months ago (2017-02-13 09:55:43 UTC) #13
markusheintz_
@Jan: I'm aware that this is not optimal and I'm unhappy about it. But this ...
3 years, 10 months ago (2017-02-13 09:59:56 UTC) #14
markusheintz_
Address time related comments
3 years, 10 months ago (2017-02-13 10:10:48 UTC) #15
markusheintz_
https://codereview.chromium.org/2686063003/diff/20001/components/ntp_snippets/remote/remote_suggestions_fetcher.cc File components/ntp_snippets/remote/remote_suggestions_fetcher.cc (right): https://codereview.chromium.org/2686063003/diff/20001/components/ntp_snippets/remote/remote_suggestions_fetcher.cc#newcode448 components/ntp_snippets/remote/remote_suggestions_fetcher.cc:448: const base::Time fetch_time = base::Time::Now(); On 2017/02/10 16:16:56, Marc ...
3 years, 10 months ago (2017-02-13 10:11:04 UTC) #16
Marc Treib
https://codereview.chromium.org/2686063003/diff/60001/components/ntp_snippets/remote/remote_suggestion.h File components/ntp_snippets/remote/remote_suggestion.h (right): https://codereview.chromium.org/2686063003/diff/60001/components/ntp_snippets/remote/remote_suggestion.h#newcode159 components/ntp_snippets/remote/remote_suggestion.h:159: // The time when the remote suggestions was fetched ...
3 years, 10 months ago (2017-02-13 10:24:49 UTC) #17
markusheintz_
https://codereview.chromium.org/2686063003/diff/60001/components/ntp_snippets/remote/remote_suggestion.h File components/ntp_snippets/remote/remote_suggestion.h (right): https://codereview.chromium.org/2686063003/diff/60001/components/ntp_snippets/remote/remote_suggestion.h#newcode159 components/ntp_snippets/remote/remote_suggestion.h:159: // The time when the remote suggestions was fetched ...
3 years, 10 months ago (2017-02-13 11:19:16 UTC) #18
jkrcal
Markus, I am fine with proceeding with this CL and relaying a redesign for later.
3 years, 10 months ago (2017-02-13 12:34:09 UTC) #19
markusheintz_
Update RemoteSuggestionTest
3 years, 10 months ago (2017-02-13 15:05:26 UTC) #24
markusheintz_
On 2017/02/13 15:05:26, markusheintz_ wrote: > Update RemoteSuggestionTest Thanks a lot Jan Marc PTAL
3 years, 10 months ago (2017-02-13 15:06:00 UTC) #27
Marc Treib
https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (right): https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:43: public final Long mFetchTimestampMilliseconds; s/Long/long/ ? https://codereview.chromium.org/2686063003/diff/100001/components/ntp_snippets/remote/json_request.h File components/ntp_snippets/remote/json_request.h ...
3 years, 10 months ago (2017-02-13 15:20:32 UTC) #28
Marc Treib
https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (right): https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:43: public final Long mFetchTimestampMilliseconds; s/Long/long/ ? https://codereview.chromium.org/2686063003/diff/100001/components/ntp_snippets/remote/json_request.h File components/ntp_snippets/remote/json_request.h ...
3 years, 10 months ago (2017-02-13 15:20:32 UTC) #29
markusheintz_
Fix android tests
3 years, 10 months ago (2017-02-13 15:43:28 UTC) #32
markusheintz_
Address comments
3 years, 10 months ago (2017-02-13 15:54:30 UTC) #37
markusheintz_
https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (right): https://codereview.chromium.org/2686063003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:43: public final Long mFetchTimestampMilliseconds; On 2017/02/13 15:20:31, Marc Treib ...
3 years, 10 months ago (2017-02-13 15:55:01 UTC) #38
markusheintz_
rebase
3 years, 10 months ago (2017-02-13 16:35:33 UTC) #39
Marc Treib
lgtm https://codereview.chromium.org/2686063003/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java (right): https://codereview.chromium.org/2686063003/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java#newcode139 chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java:139: 1466634774); // Timestamp nit: "Publish timestamp" and "Fetch ...
3 years, 10 months ago (2017-02-13 16:58:43 UTC) #42
jkrcal
Markus, Marc, thanks for doing the hard work! lgtm % one further change: please change ...
3 years, 10 months ago (2017-02-14 08:40:46 UTC) #45
Marc Treib
On 2017/02/14 08:40:46, jkrcal wrote: > Markus, Marc, thanks for doing the hard work! > ...
3 years, 10 months ago (2017-02-14 08:54:46 UTC) #46
jkrcal
On 2017/02/14 08:54:46, Marc Treib wrote: > On 2017/02/14 08:40:46, jkrcal wrote: > > Markus, ...
3 years, 10 months ago (2017-02-14 09:02:33 UTC) #47
markusheintz_
On 2017/02/14 09:02:33, jkrcal wrote: > On 2017/02/14 08:54:46, Marc Treib wrote: > > On ...
3 years, 10 months ago (2017-02-14 11:43:21 UTC) #48
markusheintz_
Addresse comment treib@
3 years, 10 months ago (2017-02-14 11:47:58 UTC) #49
Michael van Ouwerkerk
lgtm with nits https://codereview.chromium.org/2686063003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (right): https://codereview.chromium.org/2686063003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#newcode76 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:76: String previewText, String url, long publishTimestamp, ...
3 years, 10 months ago (2017-02-14 12:08:58 UTC) #50
jkrcal
On 2017/02/14 11:43:21, markusheintz_ wrote: > On 2017/02/14 09:02:33, jkrcal wrote: > > On 2017/02/14 ...
3 years, 10 months ago (2017-02-14 12:42:29 UTC) #51
markusheintz_
Address comments
3 years, 10 months ago (2017-02-14 13:09:35 UTC) #52
markusheintz_
https://codereview.chromium.org/2686063003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java (right): https://codereview.chromium.org/2686063003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java#newcode76 chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java:76: String previewText, String url, long publishTimestamp, float score, On ...
3 years, 10 months ago (2017-02-14 13:11:11 UTC) #55
markusheintz_
Fix test after reording params in a method
3 years, 10 months ago (2017-02-14 13:38:57 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2686063003/220001
3 years, 10 months ago (2017-02-15 10:38:18 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/364824)
3 years, 10 months ago (2017-02-15 10:45:01 UTC) #67
markusheintz_
rebase
3 years, 10 months ago (2017-02-15 10:50:39 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2686063003/190020
3 years, 10 months ago (2017-02-15 10:57:28 UTC) #71
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/153865) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-15 10:59:45 UTC) #73
markusheintz_
rebase
3 years, 10 months ago (2017-02-15 11:19:56 UTC) #74
markusheintz_
Sami would you mind reviewing the single line change in chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/suggestions/ContentSuggestionsTestUtils.java ? Thanks a lot
3 years, 10 months ago (2017-02-15 11:36:49 UTC) #78
markusheintz_
Remove Sami from the list of reviewers now that an OWNERS file was added which ...
3 years, 10 months ago (2017-02-15 14:30:27 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2686063003/250001
3 years, 10 months ago (2017-02-15 14:31:01 UTC) #85
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 14:39:01 UTC) #88
Message was sent while issue was closed.
Committed patchset #14 (id:250001) as
https://chromium.googlesource.com/chromium/src/+/05b1e88e39e1f54d14a3cc272be3...

Powered by Google App Engine
This is Rietveld 408576698