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

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: Fix Structure and Tests 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 30748c09d3bf48d958bc2a95a5d2970686fa748c..0bd9f5abae650d0688a13dbe8a988e20dce93197 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,21 @@ 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_PostRequest_Params& 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