Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index 7e7150a8ca705096263967837976c5518e719a52..1136a45de2e4e96b0eba15aedf36932af8c489ca 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -630,6 +630,8 @@ CommonNavigationParams MakeCommonNavigationParams( |
| report_type, GURL(), GURL(), |
| static_cast<LoFiState>(info.urlRequest.getLoFiState()), |
| base::TimeTicks::Now(), info.urlRequest.httpMethod().latin1(), |
| + (!info.urlRequest.httpBody().isNull() ? |
|
jam
2016/10/13 04:34:30
nit: this would be more readable without the doubl
|
| + info.urlRequest.httpBody().containsPasswordData() : false), |
| GetRequestBodyForWebURLRequest(info.urlRequest)); |
| } |
| @@ -5597,9 +5599,16 @@ void RenderFrameImpl::NavigateInternal( |
| ? blink::WebURLRequest::FrameTypeTopLevel |
| : blink::WebURLRequest::FrameTypeNested); |
| - if (IsBrowserSideNavigationEnabled() && common_params.post_data) |
| - request.setHTTPBody(GetWebHTTPBodyForRequestBody(common_params.post_data)); |
| - |
| + if (IsBrowserSideNavigationEnabled() && common_params.post_data) { |
| + WebHTTPBody http_body = |
| + GetWebHTTPBodyForRequestBody(common_params.post_data); |
| + // We need to preserve the fact that the HTTP body contains passwords. This |
| + // ensures that the page state is updated correctly in the browser. This |
| + // eventually ensures that the page state is stripped of password data |
| + // before being serialized to disk. |
| + http_body.setContainsPasswordData(common_params.post_contains_passwords); |
| + request.setHTTPBody(http_body); |
| + } |
| // Used to determine whether this frame is actually loading a request as part |
| // of a history navigation. |
| bool has_history_navigation_in_frame = false; |