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

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

Issue 2745363004: PlzNavigate: send SourceLocation when mixed content is found (Closed)
Patch Set: Addressed nits 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 412
413 navigation_handle_ = std::move(navigation_handle); 413 navigation_handle_ = std::move(navigation_handle);
414 414
415 if (!begin_params_.searchable_form_url.is_empty()) { 415 if (!begin_params_.searchable_form_url.is_empty()) {
416 navigation_handle_->set_searchable_form_url( 416 navigation_handle_->set_searchable_form_url(
417 begin_params_.searchable_form_url); 417 begin_params_.searchable_form_url);
418 navigation_handle_->set_searchable_form_encoding( 418 navigation_handle_->set_searchable_form_encoding(
419 begin_params_.searchable_form_encoding); 419 begin_params_.searchable_form_encoding);
420 } 420 }
421
422 if (common_params_.source_location) {
423 navigation_handle_->set_source_location(
424 common_params_.source_location.value());
425 }
421 } 426 }
422 427
423 void NavigationRequest::TransferNavigationHandleOwnership( 428 void NavigationRequest::TransferNavigationHandleOwnership(
424 RenderFrameHostImpl* render_frame_host) { 429 RenderFrameHostImpl* render_frame_host) {
425 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); 430 render_frame_host->SetNavigationHandle(std::move(navigation_handle_));
426 } 431 }
427 432
428 void NavigationRequest::OnRequestRedirected( 433 void NavigationRequest::OnRequestRedirected(
429 const net::RedirectInfo& redirect_info, 434 const net::RedirectInfo& redirect_info,
430 const scoped_refptr<ResourceResponse>& response) { 435 const scoped_refptr<ResourceResponse>& response) {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 802 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
798 803
799 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 804 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
800 common_params_, request_params_, 805 common_params_, request_params_,
801 is_view_source_); 806 is_view_source_);
802 807
803 frame_tree_node_->ResetNavigationRequest(true); 808 frame_tree_node_->ResetNavigationRequest(true);
804 } 809 }
805 810
806 } // namespace content 811 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698