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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuse ResourceRequestBody Struct Created 8 years, 1 month 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index a993a0a4f5da1bc885022e534e457434e89ffe6b..9c0333e57c05ad5fc8f3cf99496dc978103f43b7 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1000,6 +1000,7 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen,
OnMsgToggleFullscreen)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_OpenPostURL, OnMsgOpenPostURL)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
OnMsgDidContentsPreferredSizeChange)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
@@ -1375,6 +1376,19 @@ void RenderViewHostImpl::OnMsgOpenURL(const GURL& url,
this, validated_url, referrer, disposition, source_frame_id);
}
+void RenderViewHostImpl::OnMsgOpenPostURL(const GURL& url,
+ const content::Referrer& referrer,
+ WindowOpenDisposition disposition,
+ int64 source_frame_id,
+ const ViewMsg_Request& request) {
+ GURL validated_url(url);
+ FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
+ GetProcess(), false, &validated_url);
+
+ delegate_->RequestOpenPostURL(
+ this, validated_url, referrer, disposition, source_frame_id, request);
+}
+
void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange(
const gfx::Size& new_size) {
delegate_->UpdatePreferredSize(new_size);

Powered by Google App Engine
This is Rietveld 408576698