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

Unified Diff: content/common/page_state_serialization.cc

Issue 1907443006: PlzNavigate: store POST data in the FrameNavigationEntry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/page_state_serialization.cc
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 7bbced3b3f582853ce4fb229b67ef5d483e2aad8..7ed1245fdc1320381972375692414b3726ba5285 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/screen.h"
namespace content {
@@ -749,6 +750,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,

Powered by Google App Engine
This is Rietveld 408576698