Index: content/common/page_state_serialization.cc |
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc |
index af0db11467f8e256e291b1de97a801c2b855fbb1..3715ab7437622184077ad9406dd1179a6c42e8b4 100644 |
--- a/content/common/page_state_serialization.cc |
+++ b/content/common/page_state_serialization.cc |
@@ -14,6 +14,7 @@ |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "build/build_config.h" |
+#include "content/common/resource_request_body.h" |
#include "ui/display/display.h" |
#include "ui/display/screen.h" |
@@ -750,6 +751,18 @@ bool EncodePageState(const ExplodedPageState& exploded, std::string* encoded) { |
return true; |
} |
+bool GeneratePostData(const ExplodedHttpBody& exploded, |
+ ResourceRequestBody* http_body) { |
+ if (exploded.is_null) |
+ return false; |
+ |
+ http_body->set_identifier(exploded.identifier); |
+ for (auto element : exploded.elements) |
+ http_body->AppendExplodedHTTPBodyElement(element); |
+ |
+ return true; |
+} |
+ |
#if defined(OS_ANDROID) |
bool DecodePageStateWithDeviceScaleFactorForTesting( |
const std::string& encoded, |