Chromium Code Reviews| 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..4842b671ca6baf6aaa2d987034f2e0e6f8e7a531 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,22 @@ void FrameNavigationEntry::set_document_sequence_number( |
| document_sequence_number_ = document_sequence_number; |
| } |
| +scoped_refptr<ResourceRequestBody> FrameNavigationEntry::GetPostData() const { |
| + DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| + scoped_refptr<ResourceRequestBody> body; |
| + if (method_ != "POST") |
| + return body; |
|
carlosk
2016/05/20 08:59:47
nit: it seems clearer to return nullptr here and b
clamy
2016/05/20 11:00:12
Done.
|
| + |
| + // Generate the body from the PageState. |
| + ExplodedPageState exploded_state; |
| + if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) |
| + return body; |
| + |
| + body = new ResourceRequestBody(); |
| + if (!GeneratePostData(exploded_state.top.http_body, body.get())) |
| + return nullptr; |
| + |
| + return body; |
| +} |
| + |
| } // namespace content |