summaryrefslogtreecommitdiff
path: root/chromium/content/browser/frame_host/frame_navigation_entry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/frame_host/frame_navigation_entry.cc')
-rw-r--r--chromium/content/browser/frame_host/frame_navigation_entry.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chromium/content/browser/frame_host/frame_navigation_entry.cc b/chromium/content/browser/frame_host/frame_navigation_entry.cc
index a788c45b8b3..26671f7df44 100644
--- a/chromium/content/browser/frame_host/frame_navigation_entry.cc
+++ b/chromium/content/browser/frame_host/frame_navigation_entry.cc
@@ -6,6 +6,9 @@
#include <utility>
+#include "content/common/page_state_serialization.h"
+#include "content/common/site_isolation_policy.h"
+
namespace content {
FrameNavigationEntry::FrameNavigationEntry()
@@ -80,4 +83,18 @@ void FrameNavigationEntry::set_document_sequence_number(
document_sequence_number_ = document_sequence_number;
}
+scoped_refptr<ResourceRequestBodyImpl> FrameNavigationEntry::GetPostData()
+ const {
+ DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
+ if (method_ != "POST")
+ return nullptr;
+
+ // Generate the body from the PageState.
+ ExplodedPageState exploded_state;
+ if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state))
+ return nullptr;
+
+ return exploded_state.top.http_body.request_body;
+}
+
} // namespace content