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

Unified Diff: content/common/navigation_params.cc

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GoBackToCrossSitePostWithRedirect is fixed by this CL. 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/common/navigation_params.cc
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
index 39162ffe2bd06e52a2694616b60de3cf43042307..7a7ebf854c1218f66ac947d9a6ce303c26194471 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -62,7 +62,10 @@ CommonNavigationParams::CommonNavigationParams(
lofi_state(lofi_state),
navigation_start(navigation_start),
method(method),
- post_data(post_data) {}
+ post_data(post_data) {
+ // |method != "POST"| should imply absence of |post_data|.
+ DCHECK(method == "POST" || !post_data);
Łukasz Anforowicz 2016/06/01 16:28:38 I guess we could also repeat the "assertion" from
Charlie Reis 2016/06/01 23:46:32 Sounds like a good idea.
Łukasz Anforowicz 2016/06/02 22:07:04 I tried this in patchset 24, but it turns out that
+}
CommonNavigationParams::CommonNavigationParams(
const CommonNavigationParams& other) = default;

Powered by Google App Engine
This is Rietveld 408576698