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

Issue 2578173002: NTP: Extract JSON requests from Fetcher. (Closed)

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

Description

NTP: Extract JSON requests from Fetcher. This CL does not change any behavior. Moving internal classes into an internal namespace. This simplfies testing these classes (JsonRequest and its Builder) and prevents the use of internal enums (e.g. FetchResults) that were publicly exposed but not intended for public use. BUG=672422 Committed: https://crrev.com/cb5d7fc0e1740712ca116c4615b8b938e750c204 Cr-Commit-Position: refs/heads/master@{#439780}

Patch Set 1 #

Total comments: 8

Patch Set 2 : No outside accesses to ntp_snippets::internal::* #

Total comments: 4

Patch Set 3 : Rebased. #

Patch Set 4 : Updating comments. #

Total comments: 8

Patch Set 5 : Adressing nits. #

Patch Set 6 : Fixed Callback origins for iOS. #

Patch Set 7 : Use |GetVariationParamByFeatureAsBool|. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1259 lines, -1029 lines) Patch
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 2 1 chunk +4 lines, -13 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.h View 1 2 3 11 chunks +33 lines, -163 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.cc View 1 2 3 4 18 chunks +60 lines, -564 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc View 1 2 14 chunks +20 lines, -278 lines 0 comments Download
A components/ntp_snippets/remote/ntp_snippets_json_request.h View 1 2 3 4 1 chunk +192 lines, -0 lines 0 comments Download
A components/ntp_snippets/remote/ntp_snippets_json_request.cc View 1 2 3 4 5 6 1 chunk +524 lines, -0 lines 0 comments Download
A components/ntp_snippets/remote/ntp_snippets_json_request_unittest.cc View 1 2 3 4 1 chunk +335 lines, -0 lines 0 comments Download
A components/ntp_snippets/remote/ntp_snippets_request_params.h View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
A components/ntp_snippets/remote/ntp_snippets_request_params.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider.h View 1 2 3 chunks +5 lines, -1 line 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider.cc View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_provider_unittest.cc View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 31 (19 generated)
fhorschig
Hi Tim, could you please take a look of this is also what you had ...
4 years ago (2016-12-16 13:58:55 UTC) #5
tschumann
overall looks good. Only a few nits and remarks (for later CLs). https://codereview.chromium.org/2578173002/diff/60001/chrome/browser/ui/webui/snippets_internals_message_handler.cc File chrome/browser/ui/webui/snippets_internals_message_handler.cc ...
4 years ago (2016-12-16 16:36:20 UTC) #6
fhorschig
jkrcal@chromium.org: Could you please have a look at the changes in components/snippets/remote/? bauerb@chromium.org: Would you ...
4 years ago (2016-12-20 10:07:38 UTC) #8
tschumann
lgtm https://codereview.chromium.org/2578173002/diff/80001/components/ntp_snippets/remote/ntp_snippets_fetcher.h File components/ntp_snippets/remote/ntp_snippets_fetcher.h (right): https://codereview.chromium.org/2578173002/diff/80001/components/ntp_snippets/remote/ntp_snippets_fetcher.h#newcode112 components/ntp_snippets/remote/ntp_snippets_fetcher.h:112: Personalization personalization() const { return personalization_; } Lets' ...
4 years ago (2016-12-20 10:22:27 UTC) #9
fhorschig
https://codereview.chromium.org/2578173002/diff/80001/components/ntp_snippets/remote/ntp_snippets_fetcher.h File components/ntp_snippets/remote/ntp_snippets_fetcher.h (right): https://codereview.chromium.org/2578173002/diff/80001/components/ntp_snippets/remote/ntp_snippets_fetcher.h#newcode112 components/ntp_snippets/remote/ntp_snippets_fetcher.h:112: Personalization personalization() const { return personalization_; } On 2016/12/20 ...
4 years ago (2016-12-20 10:30:32 UTC) #10
Bernhard Bauer
LGTM w/ nits: https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc File components/ntp_snippets/remote/ntp_snippets_fetcher.cc (right): https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc#newcode624 components/ntp_snippets/remote/ntp_snippets_fetcher.cc:624: return ""; Nit: use the empty ...
4 years ago (2016-12-20 10:49:35 UTC) #11
jkrcal
lgtm, with a nit. Thanks! https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_json_request.cc File components/ntp_snippets/remote/ntp_snippets_json_request.cc (right): https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_json_request.cc#newcode66 components/ntp_snippets/remote/ntp_snippets_json_request.cc:66: bool IsBooleanParameterEnabled(const std::string& param_name, ...
4 years ago (2016-12-20 11:59:20 UTC) #16
fhorschig
noyau@chromium.org: Could you please have an OWNER's look for ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc? https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc File components/ntp_snippets/remote/ntp_snippets_fetcher.cc (right): https://codereview.chromium.org/2578173002/diff/120001/components/ntp_snippets/remote/ntp_snippets_fetcher.cc#newcode624 ...
4 years ago (2016-12-20 12:11:37 UTC) #18
noyau (Ping after 24h)
ios lgtm
4 years ago (2016-12-20 12:26:43 UTC) #21
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/2578173002/180001
4 years ago (2016-12-20 13:10:27 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:180001)
4 years ago (2016-12-20 13:15:28 UTC) #29
commit-bot: I haz the power
4 years ago (2016-12-20 13:18:57 UTC) #31
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/cb5d7fc0e1740712ca116c4615b8b938e750c204
Cr-Commit-Position: refs/heads/master@{#439780}

Powered by Google App Engine
This is Rietveld 408576698