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

Issue 1999943002: Moving HTTP POST body from StartNavigationParams to CommonNavigationParams. (Closed)

Created:
4 years, 7 months ago by Łukasz Anforowicz
Modified:
4 years, 7 months ago
Reviewers:
kenrb, Charlie Reis, clamy
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, loading-reviews_chromium.org, clamy, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Moving HTTP POST body from StartNavigationParams to CommonNavigationParams. StartNavigationParams used to hold std::vector<unsigned char> browser_initiated_post_data field. This CL moves the field to CommonNavigationParams and makes it more generic, so that it can be used to carry any POST data (nost just "browser initiated" post data): scoped_refptr<ResourceRequestBody> post_data; Making the type more generic (i.e. replacing a vector of bytes with ResourceRequestBody) is needed to prepare for forwarding POST data back to the renderer during process transfers. This fix will come in crrev.com/1956383003. Moving the type from StartNavigationParams to CommonNavigationParams helps unify many scenarios across default and PlzNavigate modes and consequently allows avoiding passing of the body as a separate field and/or param in quite a few places. BUG=582211 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d04640fa1384d4610828f7e40be9f60ae30ff033 Cr-Commit-Position: refs/heads/master@{#395915}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Addressed CR feedback from clamy@. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -143 lines) Patch
M content/browser/frame_host/navigation_entry_impl.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 3 chunks +19 lines, -11 lines 0 comments Download
M content/browser/frame_host/navigation_request.h View 3 chunks +0 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 9 chunks +7 lines, -18 lines 0 comments Download
M content/browser/frame_host/navigation_request_info.h View 2 chunks +1 line, -4 lines 0 comments Download
M content/browser/frame_host/navigation_request_info.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigator.h View 1 chunk +3 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigator.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigator_impl.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 4 chunks +6 lines, -8 lines 0 comments Download
M content/browser/loader/navigation_url_loader_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M content/common/frame_messages.h View 4 chunks +5 lines, -7 lines 0 comments Download
M content/common/navigation_params.h View 4 chunks +11 lines, -11 lines 0 comments Download
M content/common/navigation_params.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M content/public/test/render_view_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.h View 2 chunks +2 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 9 chunks +13 lines, -24 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M content/test/test_render_frame.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_render_frame_host.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 23 (10 generated)
Łukasz Anforowicz
Charlie, could you please take a look? This refactoring has been suggested in https://codereview.chromium.org/1956383003/diff/160001/content/common/navigation_params.h#newcode191
4 years, 7 months ago (2016-05-20 22:17:06 UTC) #3
clamy
Thanks! It looks nicer with the unification. A few questions below. https://codereview.chromium.org/1999943002/diff/1/content/browser/frame_host/navigation_request.cc File content/browser/frame_host/navigation_request.cc (right): ...
4 years, 7 months ago (2016-05-23 16:59:29 UTC) #6
Charlie Reis
Nice! Looks good, but I'm curious about Camille's question in NavigateInternal. https://codereview.chromium.org/1999943002/diff/1/content/browser/frame_host/navigation_entry_impl.cc File content/browser/frame_host/navigation_entry_impl.cc (right): ...
4 years, 7 months ago (2016-05-23 18:14:10 UTC) #7
Łukasz Anforowicz
https://codereview.chromium.org/1999943002/diff/1/content/browser/frame_host/navigation_entry_impl.cc File content/browser/frame_host/navigation_entry_impl.cc (right): https://codereview.chromium.org/1999943002/diff/1/content/browser/frame_host/navigation_entry_impl.cc#newcode576 content/browser/frame_host/navigation_entry_impl.cc:576: if (GetHasPostData()) { On 2016/05/23 18:14:10, Charlie Reis (slow ...
4 years, 7 months ago (2016-05-23 18:38:47 UTC) #8
Charlie Reis
LGTM https://codereview.chromium.org/1999943002/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1999943002/diff/1/content/renderer/render_frame_impl.cc#newcode5497 content/renderer/render_frame_impl.cc:5497: AddHTTPBodyToRequest(&request, common_params.post_data); On 2016/05/23 18:38:47, Łukasz Anforowicz wrote: ...
4 years, 7 months ago (2016-05-23 19:07:26 UTC) #9
clamy
Thanks! Lgtm. https://codereview.chromium.org/1999943002/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1999943002/diff/1/content/renderer/render_frame_impl.cc#newcode5497 content/renderer/render_frame_impl.cc:5497: AddHTTPBodyToRequest(&request, common_params.post_data); On 2016/05/23 19:07:26, Charlie Reis ...
4 years, 7 months ago (2016-05-24 11:46:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1999943002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1999943002/20001
4 years, 7 months ago (2016-05-24 13:54:24 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/188803)
4 years, 7 months ago (2016-05-24 14:00:46 UTC) #14
Łukasz Anforowicz
+kenrb@ for security review of //content/common/frame_messages.h Summary of changes in frame_messages.h: - before the CL: ...
4 years, 7 months ago (2016-05-24 15:41:45 UTC) #16
kenrb
ipc lgtm
4 years, 7 months ago (2016-05-25 14:51:52 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1999943002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1999943002/20001
4 years, 7 months ago (2016-05-25 15:03:57 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-25 17:08:57 UTC) #21
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 17:11:17 UTC) #23
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d04640fa1384d4610828f7e40be9f60ae30ff033
Cr-Commit-Position: refs/heads/master@{#395915}

Powered by Google App Engine
This is Rietveld 408576698