Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 1907443006: PlzNavigate: store POST data in the FrameNavigationEntry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..81931e4b00a3c1788aa5f836f0e0888cd86bf4dd 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -19,6 +19,7 @@
#include "content/common/navigation_params.h"
#include "content/common/page_state_serialization.h"
#include "content/common/site_isolation_policy.h"
+#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/url_constants.h"
#include "ui/gfx/text_elider.h"
@@ -569,6 +570,7 @@ std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace(
}
CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
+ const FrameNavigationEntry& frame_entry,
const GURL& dest_url,
const Referrer& dest_referrer,
FrameMsg_Navigate_Type::Value navigation_type,
@@ -583,11 +585,20 @@ CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
ui_timestamp = intent_received_timestamp();
#endif
+ std::string method;
+
+ // TODO(clamy): Consult the FrameNavigationEntry in all modes that use
+ // subframe navigation entries.
+ if (IsBrowserSideNavigationEnabled())
+ method = frame_entry.method();
+ else
+ method = GetHasPostData() ? "POST" : "GET";
+
return CommonNavigationParams(
dest_url, dest_referrer, GetTransitionType(), navigation_type,
!IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type,
GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state,
- navigation_start, GetHasPostData() ? "POST" : "GET");
+ navigation_start, method);
}
StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()

Powered by Google App Engine
This is Rietveld 408576698