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

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

Issue 2381503003: PlzNav: Fix NavigationControllerBrowserTest.EnsureSamePageNavigationUpdatesFrameNaviga… (Closed)
Patch Set: . Created 4 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
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 "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 common_params_.lofi_state = LOFI_ON; 376 common_params_.lofi_state = LOFI_ON;
377 else 377 else
378 common_params_.lofi_state = LOFI_OFF; 378 common_params_.lofi_state = LOFI_OFF;
379 379
380 // Select an appropriate renderer to commit the navigation. 380 // Select an appropriate renderer to commit the navigation.
381 RenderFrameHostImpl* render_frame_host = 381 RenderFrameHostImpl* render_frame_host =
382 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); 382 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this);
383 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, 383 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host,
384 common_params_.url); 384 common_params_.url);
385 385
386 if (render_frame_host->GetLastCommittedURL() ==
387 navigation_handle_->original_url() &&
388 common_params_.navigation_type == FrameMsg_Navigate_Type::NORMAL &&
389 navigation_handle_->WasServerRedirect() &&
clamy 2016/10/05 12:47:04 Is the redirect part needed? Otherwise, when we cr
nasko 2016/10/05 22:07:09 Yeah, I'm not sure why we have the redirect check
390 ui::PageTransitionCoreTypeIs(navigation_handle_->GetPageTransition(),
391 ui::PAGE_TRANSITION_RELOAD)) {
392 common_params_.navigation_type =
393 FrameMsg_Navigate_Type::RELOAD_MAIN_RESOURCE;
nasko 2016/10/05 22:07:09 I'm a bit afraid of such change. I do want us to d
394 }
395
386 // For renderer-initiated navigations that are set to commit in a different 396 // For renderer-initiated navigations that are set to commit in a different
387 // renderer, allow the embedder to cancel the transfer. 397 // renderer, allow the embedder to cancel the transfer.
388 if (!browser_initiated_ && 398 if (!browser_initiated_ &&
389 render_frame_host != frame_tree_node_->current_frame_host() && 399 render_frame_host != frame_tree_node_->current_frame_host() &&
390 !frame_tree_node_->navigator()->GetDelegate()->ShouldTransferNavigation( 400 !frame_tree_node_->navigator()->GetDelegate()->ShouldTransferNavigation(
391 frame_tree_node_->IsMainFrame())) { 401 frame_tree_node_->IsMainFrame())) {
392 frame_tree_node_->ResetNavigationRequest(false); 402 frame_tree_node_->ResetNavigationRequest(false);
393 return; 403 return;
394 } 404 }
395 405
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 561
552 TransferNavigationHandleOwnership(render_frame_host); 562 TransferNavigationHandleOwnership(render_frame_host);
553 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 563 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
554 common_params_, request_params_, 564 common_params_, request_params_,
555 is_view_source_); 565 is_view_source_);
556 566
557 frame_tree_node_->ResetNavigationRequest(true); 567 frame_tree_node_->ResetNavigationRequest(true);
558 } 568 }
559 569
560 } // namespace content 570 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698