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

Side by Side Diff: content/browser/renderer_host/render_message_filter.cc

Issue 12036002: Filter more incoming URLs in the CreateWindow path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_message_filter.h" 5 #include "content/browser/renderer_host/render_message_filter.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 456
457 void RenderMessageFilter::OnCreateWindow( 457 void RenderMessageFilter::OnCreateWindow(
458 const ViewHostMsg_CreateWindow_Params& params, 458 const ViewHostMsg_CreateWindow_Params& params,
459 int* route_id, 459 int* route_id,
460 int* surface_id, 460 int* surface_id,
461 int64* cloned_session_storage_namespace_id) { 461 int64* cloned_session_storage_namespace_id) {
462 bool no_javascript_access; 462 bool no_javascript_access;
463 bool can_create_window = 463 bool can_create_window =
464 GetContentClient()->browser()->CanCreateWindow( 464 GetContentClient()->browser()->CanCreateWindow(
465 GURL(params.opener_url), 465 params.opener_url,
466 GURL(params.opener_security_origin), 466 params.opener_security_origin,
467 params.window_container_type, 467 params.window_container_type,
468 resource_context_, 468 resource_context_,
469 render_process_id_, 469 render_process_id_,
470 &no_javascript_access); 470 &no_javascript_access);
471 471
472 if (!can_create_window) { 472 if (!can_create_window) {
473 *route_id = MSG_ROUTING_NONE; 473 *route_id = MSG_ROUTING_NONE;
474 *surface_id = 0; 474 *surface_id = 0;
475 return; 475 return;
476 } 476 }
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 1141
1142 HENHMETAFILE metafile = CloseEnhMetaFile(hdc); 1142 HENHMETAFILE metafile = CloseEnhMetaFile(hdc);
1143 1143
1144 if (metafile) { 1144 if (metafile) {
1145 DeleteEnhMetaFile(metafile); 1145 DeleteEnhMetaFile(metafile);
1146 } 1146 }
1147 } 1147 }
1148 #endif 1148 #endif
1149 1149
1150 } // namespace content 1150 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698