| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/frame_host/frame_navigation_entry.h" | 5 #include "content/browser/frame_host/frame_navigation_entry.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/common/page_state_serialization.h" | 9 #include "content/common/page_state_serialization.h" |
| 10 #include "content/common/site_isolation_policy.h" | 10 #include "content/common/site_isolation_policy.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 ExplodedPageState exploded_state; | 92 ExplodedPageState exploded_state; |
| 93 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) | 93 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) |
| 94 return; | 94 return; |
| 95 | 95 |
| 96 item_sequence_number_ = exploded_state.top.item_sequence_number; | 96 item_sequence_number_ = exploded_state.top.item_sequence_number; |
| 97 document_sequence_number_ = exploded_state.top.document_sequence_number; | 97 document_sequence_number_ = exploded_state.top.document_sequence_number; |
| 98 } | 98 } |
| 99 | 99 |
| 100 scoped_refptr<ResourceRequestBodyImpl> FrameNavigationEntry::GetPostData() | 100 scoped_refptr<ResourceRequestBodyImpl> FrameNavigationEntry::GetPostData() |
| 101 const { | 101 const { |
| 102 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); | |
| 103 if (method_ != "POST") | 102 if (method_ != "POST") |
| 104 return nullptr; | 103 return nullptr; |
| 105 | 104 |
| 106 // Generate the body from the PageState. | 105 // Generate the body from the PageState. |
| 107 ExplodedPageState exploded_state; | 106 ExplodedPageState exploded_state; |
| 108 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) | 107 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) |
| 109 return nullptr; | 108 return nullptr; |
| 110 | 109 |
| 111 return exploded_state.top.http_body.request_body; | 110 return exploded_state.top.http_body.request_body; |
| 112 } | 111 } |
| 113 | 112 |
| 114 } // namespace content | 113 } // namespace content |
| OLD | NEW |