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

Issue 2395123002: Connecting UserClassifier to NtpSnippetsFetcher (Closed)

Created:
4 years, 2 months ago by jkrcal
Modified:
4 years, 2 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Connecting UserClassifier to NtpSnippetsFetcher This CL applies UserClassifier in NtpSnippetsFetcher. The application is twofold: - current user class is sent in each request to content suggestion server, - RequestThrottler for NtpSnippetsFetcher is notified of current class and thus can apply different quota for different user classes. To make this possible, this CL add to RequestThrottler support for changing RequestType on the fly. The CL also fixes a typo from CL 2400133002: "top_languages" -> "topLanguages". BUG=651813, 653526 Committed: https://crrev.com/b5893c0d4748c70ae1eb140d17ba188ce6e1e842 Cr-Commit-Position: refs/heads/master@{#424132}

Patch Set 1 #

Patch Set 2 : A small fix #

Total comments: 9

Patch Set 3 : Marc's comments #

Patch Set 4 : A minor fix #

Total comments: 10

Patch Set 5 : Marc's comments #2 #

Patch Set 6 : Further polish #

Patch Set 7 : Robert's comment #

Patch Set 8 : Robert's comment #2 #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Total comments: 2

Patch Set 11 : Adding a variation parameter guard & rebase #

Patch Set 12 : Minor fixes #

Patch Set 13 : Rebase #

Total comments: 4

Patch Set 14 : Marc's comments #3 #

Patch Set 15 : Rebase #

Patch Set 16 : Unit-test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -41 lines) Patch
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +15 lines, -3 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +80 lines, -17 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +35 lines, -7 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/remote/request_throttler.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M components/ntp_snippets/remote/request_throttler.cc View 1 2 3 4 5 3 chunks +25 lines, -7 lines 0 comments Download
M components/ntp_snippets/remote/request_throttler_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/ntp_snippets/user_classifier.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 63 (41 generated)
jkrcal
Marc, could you PTAL? Robert, could you PTAL at histograms.xml?
4 years, 2 months ago (2016-10-06 13:30:26 UTC) #2
Marc Treib
https://codereview.chromium.org/2395123002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right): https://codereview.chromium.org/2395123002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc#newcode160 chrome/browser/ntp_snippets/content_suggestions_service_factory.cc:160: service->user_classifier()), You'll also have to do this for ios. ...
4 years, 2 months ago (2016-10-06 13:41:55 UTC) #3
jkrcal
Thanks, Marc! PTAL again. Éric, could you PTAL at the ios factory? https://codereview.chromium.org/2395123002/diff/20001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc ...
4 years, 2 months ago (2016-10-06 14:45:58 UTC) #5
Marc Treib
https://codereview.chromium.org/2395123002/diff/20001/components/ntp_snippets/remote/request_throttler.h File components/ntp_snippets/remote/request_throttler.h (right): https://codereview.chromium.org/2395123002/diff/20001/components/ntp_snippets/remote/request_throttler.h#newcode51 components/ntp_snippets/remote/request_throttler.h:51: void ChangeRequestType(RequestType new_type); On 2016/10/06 14:45:58, jkrcal wrote: > ...
4 years, 2 months ago (2016-10-06 14:54:37 UTC) #6
jkrcal
Thanks, PTAL again. https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc File components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc (right): https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc#newcode160 components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc:160: user_classifier_(nullptr /* pref_service_ */), On 2016/10/06 ...
4 years, 2 months ago (2016-10-06 15:18:41 UTC) #7
Marc Treib
LGTM, thanks! https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/request_throttler.cc File components/ntp_snippets/remote/request_throttler.cc (right): https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/request_throttler.cc#newcode126 components/ntp_snippets/remote/request_throttler.cc:126: // day_pref is enough. On 2016/10/06 15:18:41, ...
4 years, 2 months ago (2016-10-06 15:27:26 UTC) #10
jkrcal
Thanks, Marc! https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/request_throttler.cc File components/ntp_snippets/remote/request_throttler.cc (right): https://codereview.chromium.org/2395123002/diff/60001/components/ntp_snippets/remote/request_throttler.cc#newcode126 components/ntp_snippets/remote/request_throttler.cc:126: // day_pref is enough. On 2016/10/06 15:27:26, ...
4 years, 2 months ago (2016-10-06 18:25:38 UTC) #15
rkaplow
Looks like there is a typo, SuggestionFetcherRareNTPUser and SuggestionFetcherRareNTPUser*s* for all the suffixes
4 years, 2 months ago (2016-10-06 20:24:29 UTC) #18
jkrcal
On 2016/10/06 20:24:29, rkaplow wrote: > Looks like there is a typo, SuggestionFetcherRareNTPUser and > ...
4 years, 2 months ago (2016-10-06 20:32:24 UTC) #19
jkrcal
On 2016/10/06 20:32:24, jkrcal wrote: > On 2016/10/06 20:24:29, rkaplow wrote: > > Looks like ...
4 years, 2 months ago (2016-10-06 20:33:26 UTC) #20
jkrcal
On 2016/10/06 20:33:26, jkrcal wrote: > On 2016/10/06 20:32:24, jkrcal wrote: > > On 2016/10/06 ...
4 years, 2 months ago (2016-10-06 20:37:38 UTC) #23
jkrcal
Sylvain, could you PTAL at the iOS factory (as Éric does not react)?
4 years, 2 months ago (2016-10-07 09:25:20 UTC) #27
sdefresne
ios/ lgtm
4 years, 2 months ago (2016-10-07 09:50:21 UTC) #28
jwd
https://codereview.chromium.org/2395123002/diff/180001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2395123002/diff/180001/tools/metrics/histograms/histograms.xml#newcode108136 tools/metrics/histograms/histograms.xml:108136: + suggestions consumers"/> Do these three overlap? It seems ...
4 years, 2 months ago (2016-10-07 14:28:24 UTC) #34
jkrcal
Thanks, Jesse! https://codereview.chromium.org/2395123002/diff/180001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2395123002/diff/180001/tools/metrics/histograms/histograms.xml#newcode108136 tools/metrics/histograms/histograms.xml:108136: + suggestions consumers"/> On 2016/10/07 14:28:24, jwd ...
4 years, 2 months ago (2016-10-07 14:36:52 UTC) #35
jwd
lgtm
4 years, 2 months ago (2016-10-07 14:39:36 UTC) #36
jkrcal
Marc, I've changed a few bits in ntp_snippets_fetcher.cc. Guarding the message to the server behind ...
4 years, 2 months ago (2016-10-07 19:22:03 UTC) #41
Marc Treib
ntp_snippet_fetcher still LGTM, modulo the question about naming convention https://codereview.chromium.org/2395123002/diff/240001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc File components/ntp_snippets/remote/ntp_snippets_fetcher.cc (right): https://codereview.chromium.org/2395123002/diff/240001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc#newcode132 components/ntp_snippets/remote/ntp_snippets_fetcher.cc:132: ...
4 years, 2 months ago (2016-10-10 08:01:01 UTC) #46
jkrcal
Thanks, Marc! https://codereview.chromium.org/2395123002/diff/240001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc File components/ntp_snippets/remote/ntp_snippets_fetcher.cc (right): https://codereview.chromium.org/2395123002/diff/240001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc#newcode132 components/ntp_snippets/remote/ntp_snippets_fetcher.cc:132: bool IsBooleanParameterEnabled(std::string param_name, bool default_value) { On ...
4 years, 2 months ago (2016-10-10 08:37:16 UTC) #47
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/2395123002/300001
4 years, 2 months ago (2016-10-10 11:11:51 UTC) #59
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 2 months ago (2016-10-10 11:17:07 UTC) #61
commit-bot: I haz the power
4 years, 2 months ago (2016-10-10 11:19:07 UTC) #63
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/b5893c0d4748c70ae1eb140d17ba188ce6e1e842
Cr-Commit-Position: refs/heads/master@{#424132}

Powered by Google App Engine
This is Rietveld 408576698