Chromium Code Reviews| Index: content/public/common/page_state.cc |
| diff --git a/content/public/common/page_state.cc b/content/public/common/page_state.cc |
| index 74f65df7b97383ed190a6412f334d0ead3a7667f..ccdfc0cda4242281618bf24d13e33f692ce53af0 100644 |
| --- a/content/public/common/page_state.cc |
| +++ b/content/public/common/page_state.cc |
| @@ -85,16 +85,13 @@ PageState PageState::CreateForTesting( |
| state.top.url_string = ToNullableString16(url.possibly_invalid_spec()); |
| if (optional_body_data || optional_body_file_path) { |
| - state.top.http_body.is_null = false; |
| if (optional_body_data) { |
| - ExplodedHttpBodyElement element; |
| std::string body_data(optional_body_data); |
| - element.SetToBytes(body_data.data(), body_data.size()); |
| - state.top.http_body.elements.push_back(element); |
| + state.top.http_body.request_body = new ResourceRequestBody(); |
| + state.top.http_body.request_body->AppendBytes(body_data.data(), |
| + body_data.size()); |
| } |
| if (optional_body_file_path) { |
|
Łukasz Anforowicz
2016/05/26 16:26:52
This branch is taken by some tests. I assume that
Charlie Reis
2016/05/27 21:45:53
Oh, interesting. I see that this old code never a
Łukasz Anforowicz
2016/05/31 16:38:04
Done - I should have written it this way from the
|
| - ExplodedHttpBodyElement element; |
| - element.SetToFilePath(*optional_body_file_path); |
| state.referenced_files.push_back(base::NullableString16( |
| optional_body_file_path->AsUTF16Unsafe(), false)); |
| } |