Index: content/browser/frame_host/frame_navigation_entry.cc |
diff --git a/content/browser/frame_host/frame_navigation_entry.cc b/content/browser/frame_host/frame_navigation_entry.cc |
index a788c45b8b325a75727f8a352b10316bfac3128d..3aada24b87a796293224c8901146babb14028d3c 100644 |
--- a/content/browser/frame_host/frame_navigation_entry.cc |
+++ b/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,21 @@ void FrameNavigationEntry::set_document_sequence_number( |
document_sequence_number_ = document_sequence_number; |
} |
+scoped_refptr<ResourceRequestBody> 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; |
+ |
+ scoped_refptr<ResourceRequestBody> body = new ResourceRequestBody(); |
+ if (!GeneratePostData(exploded_state.top.http_body, body.get())) |
+ return nullptr; |
+ |
+ return body; |
+} |
+ |
} // namespace content |