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..01240db98591f4823406af4833a69b5d4adba135 100644 |
--- a/content/public/common/page_state.cc |
+++ b/content/public/common/page_state.cc |
@@ -7,7 +7,6 @@ |
#include <stddef.h> |
#include "base/files/file_path.h" |
-#include "base/strings/nullable_string16.h" |
#include "base/strings/utf_string_conversions.h" |
#include "content/common/page_state_serialization.h" |
@@ -88,15 +87,17 @@ |
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()); |
+ element.type = blink::WebHTTPBody::Element::TypeData; |
+ element.data = optional_body_data; |
state.top.http_body.elements.push_back(element); |
} |
if (optional_body_file_path) { |
ExplodedHttpBodyElement element; |
- element.SetToFilePath(*optional_body_file_path); |
- state.referenced_files.push_back(base::NullableString16( |
- optional_body_file_path->AsUTF16Unsafe(), false)); |
+ element.type = blink::WebHTTPBody::Element::TypeFile; |
+ element.file_path = |
+ ToNullableString16(optional_body_file_path->AsUTF8Unsafe()); |
+ state.top.http_body.elements.push_back(element); |
+ state.referenced_files.push_back(element.file_path); |
} |
state.top.http_body.contains_passwords = |
body_contains_password_data; |