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

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

Issue 2756913002: Revert of PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: 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(common_params_.url, redirect_chain, 400 NavigationHandleImpl::Create(
401 frame_tree_node_, !browser_initiated_, 401 common_params_.url, redirect_chain, frame_tree_node_,
402 FrameMsg_Navigate_Type::IsSameDocument( 402 !browser_initiated_, FrameMsg_Navigate_Type::IsSameDocument(
403 common_params_.navigation_type), 403 common_params_.navigation_type),
404 common_params_.navigation_start, 404 common_params_.navigation_start, pending_nav_entry_id,
405 pending_nav_entry_id, 405 false); // started_in_context_menu
406 false, // started_in_context_menu
407 common_params_.should_check_main_world_csp);
408 406
409 if (!frame_tree_node->navigation_request()) { 407 if (!frame_tree_node->navigation_request()) {
410 // A callback could have cancelled this request synchronously in which case 408 // A callback could have cancelled this request synchronously in which case
411 // |this| is deleted. 409 // |this| is deleted.
412 return; 410 return;
413 } 411 }
414 412
415 navigation_handle_ = std::move(navigation_handle); 413 navigation_handle_ = std::move(navigation_handle);
416 414
417 if (!begin_params_.searchable_form_url.is_empty()) { 415 if (!begin_params_.searchable_form_url.is_empty()) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 811 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
814 812
815 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 813 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
816 common_params_, request_params_, 814 common_params_, request_params_,
817 is_view_source_); 815 is_view_source_);
818 816
819 frame_tree_node_->ResetNavigationRequest(true); 817 frame_tree_node_->ResetNavigationRequest(true);
820 } 818 }
821 819
822 } // namespace content 820 } // 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