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

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Rebase. Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/browser/appcache/appcache_navigation_handle.h" 10 #include "content/browser/appcache/appcache_navigation_handle.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) { 390 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) {
391 DCHECK_EQ(frame_tree_node_->navigation_request(), this); 391 DCHECK_EQ(frame_tree_node_->navigation_request(), this);
392 FrameTreeNode* frame_tree_node = frame_tree_node_; 392 FrameTreeNode* frame_tree_node = frame_tree_node_;
393 393
394 std::vector<GURL> redirect_chain; 394 std::vector<GURL> redirect_chain;
395 if (!begin_params_.client_side_redirect_url.is_empty()) 395 if (!begin_params_.client_side_redirect_url.is_empty())
396 redirect_chain.push_back(begin_params_.client_side_redirect_url); 396 redirect_chain.push_back(begin_params_.client_side_redirect_url);
397 redirect_chain.push_back(common_params_.url); 397 redirect_chain.push_back(common_params_.url);
398 398
399 std::unique_ptr<NavigationHandleImpl> navigation_handle = 399 std::unique_ptr<NavigationHandleImpl> navigation_handle =
400 NavigationHandleImpl::Create( 400 NavigationHandleImpl::Create(common_params_.url, redirect_chain,
401 common_params_.url, redirect_chain, frame_tree_node_, 401 frame_tree_node_, !browser_initiated_,
402 !browser_initiated_, FrameMsg_Navigate_Type::IsSameDocument( 402 FrameMsg_Navigate_Type::IsSameDocument(
403 common_params_.navigation_type), 403 common_params_.navigation_type),
404 common_params_.navigation_start, pending_nav_entry_id, 404 common_params_.navigation_start,
405 false); // started_in_context_menu 405 pending_nav_entry_id,
406 false, // started_in_context_menu
407 common_params_.should_check_main_world_csp);
406 408
407 if (!frame_tree_node->navigation_request()) { 409 if (!frame_tree_node->navigation_request()) {
408 // A callback could have cancelled this request synchronously in which case 410 // A callback could have cancelled this request synchronously in which case
409 // |this| is deleted. 411 // |this| is deleted.
410 return; 412 return;
411 } 413 }
412 414
413 navigation_handle_ = std::move(navigation_handle); 415 navigation_handle_ = std::move(navigation_handle);
414 416
415 if (!begin_params_.searchable_form_url.is_empty()) { 417 if (!begin_params_.searchable_form_url.is_empty()) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 813 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
812 814
813 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 815 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
814 common_params_, request_params_, 816 common_params_, request_params_,
815 is_view_source_); 817 is_view_source_);
816 818
817 frame_tree_node_->ResetNavigationRequest(true); 819 frame_tree_node_->ResetNavigationRequest(true);
818 } 820 }
819 821
820 } // namespace content 822 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl_unittest.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698