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

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: Rebase + 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
« no previous file with comments | « content/common/page_state_serialization.h ('k') | content/common/resource_request_body.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/common/page_state_serialization.h ('k') | content/common/resource_request_body.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698