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

Side by Side 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 FileRead Permission Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, 985 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress,
986 OnMsgDidChangeLoadProgress) 986 OnMsgDidChangeLoadProgress)
987 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, 987 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
988 OnMsgDocumentAvailableInMainFrame) 988 OnMsgDocumentAvailableInMainFrame)
989 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, 989 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
990 OnMsgDocumentOnLoadCompletedInMainFrame) 990 OnMsgDocumentOnLoadCompletedInMainFrame)
991 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) 991 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu)
992 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, 992 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen,
993 OnMsgToggleFullscreen) 993 OnMsgToggleFullscreen)
994 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) 994 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
995 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenPostURL, OnMsgOpenPostURL)
995 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 996 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
996 OnMsgDidContentsPreferredSizeChange) 997 OnMsgDidContentsPreferredSizeChange)
997 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame, 998 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
998 OnMsgDidChangeScrollbarsForMainFrame) 999 OnMsgDidChangeScrollbarsForMainFrame)
999 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, 1000 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
1000 OnMsgDidChangeScrollOffsetPinningForMainFrame) 1001 OnMsgDidChangeScrollOffsetPinningForMainFrame)
1001 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents,
1002 OnMsgDidChangeNumWheelEvents) 1003 OnMsgDidChangeNumWheelEvents)
1003 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, 1004 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
1004 OnMsgRouteCloseEvent) 1005 OnMsgRouteCloseEvent)
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 WindowOpenDisposition disposition, 1359 WindowOpenDisposition disposition,
1359 int64 source_frame_id) { 1360 int64 source_frame_id) {
1360 GURL validated_url(url); 1361 GURL validated_url(url);
1361 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(), 1362 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
1362 GetProcess()->GetID(), false, &validated_url); 1363 GetProcess()->GetID(), false, &validated_url);
1363 1364
1364 delegate_->RequestOpenURL( 1365 delegate_->RequestOpenURL(
1365 this, validated_url, referrer, disposition, source_frame_id); 1366 this, validated_url, referrer, disposition, source_frame_id);
1366 } 1367 }
1367 1368
1369 void RenderViewHostImpl::OnMsgOpenPostURL(const GURL& url,
1370 const content::Referrer& referrer,
1371 WindowOpenDisposition disposition,
1372 int64 source_frame_id,
1373 std::vector<content::WebHTTPPOSTBodyParams > post_data) {
1374 GURL validated_url(url);
1375 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
1376 GetProcess()->GetID(), false, &validated_url);
1377
1378 delegate_->RequestOpenPostURL(
1379 this, validated_url, referrer, disposition, source_frame_id,
1380 true, /* is_post */
michaeln 2012/10/23 23:22:18 Is the bool param needed for this method which see
irobert 2012/10/24 00:51:17 Yes. You are right. On 2012/10/23 23:22:18, micha
1381 post_data /* post_data */);
1382 }
1383
1368 void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange( 1384 void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange(
1369 const gfx::Size& new_size) { 1385 const gfx::Size& new_size) {
1370 delegate_->UpdatePreferredSize(new_size); 1386 delegate_->UpdatePreferredSize(new_size);
1371 } 1387 }
1372 1388
1373 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) { 1389 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) {
1374 delegate_->ResizeDueToAutoResize(new_size); 1390 delegate_->ResizeDueToAutoResize(new_size);
1375 } 1391 }
1376 1392
1377 void RenderViewHostImpl::OnMsgDidChangeScrollbarsForMainFrame( 1393 void RenderViewHostImpl::OnMsgDidChangeScrollbarsForMainFrame(
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 is_waiting_for_beforeunload_ack_ = false; 2024 is_waiting_for_beforeunload_ack_ = false;
2009 is_waiting_for_unload_ack_ = false; 2025 is_waiting_for_unload_ack_ = false;
2010 has_timed_out_on_unload_ = false; 2026 has_timed_out_on_unload_ = false;
2011 } 2027 }
2012 2028
2013 void RenderViewHostImpl::ClearPowerSaveBlockers() { 2029 void RenderViewHostImpl::ClearPowerSaveBlockers() {
2014 STLDeleteValues(&power_save_blockers_); 2030 STLDeleteValues(&power_save_blockers_);
2015 } 2031 }
2016 2032
2017 } // namespace content 2033 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698