| Index: content/browser/frame_host/navigation_entry_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
|
| index 092281a6e51573406cd3598cad582d68b78097c3..e835878fb4933b79deab55badf7c786bf8377206 100644
|
| --- a/content/browser/frame_host/navigation_entry_impl.cc
|
| +++ b/content/browser/frame_host/navigation_entry_impl.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "build/build_config.h"
|
| #include "components/url_formatter/url_formatter.h"
|
| +#include "content/browser/frame_host/navigation_handle_impl.h"
|
| #include "content/common/content_constants_internal.h"
|
| #include "content/common/navigation_params.h"
|
| #include "content/common/page_state_serialization.h"
|
| @@ -590,17 +591,17 @@ CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
|
| navigation_start, GetHasPostData() ? "POST" : "GET");
|
| }
|
|
|
| -StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
|
| - const {
|
| - std::vector<unsigned char> browser_initiated_post_data;
|
| - if (GetBrowserInitiatedPostData()) {
|
| - browser_initiated_post_data.assign(
|
| - GetBrowserInitiatedPostData()->front(),
|
| - GetBrowserInitiatedPostData()->front() +
|
| - GetBrowserInitiatedPostData()->size());
|
| +StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams(
|
| + const NavigationHandleImpl& navigation_handle) const {
|
| + scoped_refptr<ResourceRequestBody> post_data;
|
| + if (const base::RefCountedMemory* memory = GetBrowserInitiatedPostData()) {
|
| + post_data = new ResourceRequestBody();
|
| + post_data->AppendBytes(memory->front_as<char>(), memory->size());
|
| + } else {
|
| + post_data = navigation_handle.resource_request_body();
|
| }
|
|
|
| - return StartNavigationParams(extra_headers(), browser_initiated_post_data,
|
| + return StartNavigationParams(extra_headers(), post_data,
|
| #if defined(OS_ANDROID)
|
| has_user_gesture(),
|
| #endif
|
|
|