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..97e863e39d84edb1a5e6028885a6dd93eda4e92d 100644 |
| --- a/content/browser/frame_host/frame_navigation_entry.cc |
| +++ b/content/browser/frame_host/frame_navigation_entry.cc |
| @@ -6,6 +6,10 @@ |
| #include <utility> |
| +#include "base/strings/utf_string_conversions.h" |
|
Charlie Reis
2016/05/16 21:16:42
Is this stale?
clamy
2016/05/19 13:11:57
Yes. Removed it.
|
| +#include "content/common/page_state_serialization.h" |
| +#include "content/common/site_isolation_policy.h" |
| + |
| namespace content { |
| FrameNavigationEntry::FrameNavigationEntry() |
| @@ -80,4 +84,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; |
| + |
| + // 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 |