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

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Fix 2 WebContentsImplTest by assigning a document_sequence_number. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index a67de695a205b85c456d5c8f63254140222ec10f..fa986781bdbfbbd59ba56434e9a5ff7dbdead7ee 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -363,9 +363,11 @@ void FrameTreeNode::CreatedNavigationRequest(
navigation_request_ = std::move(navigation_request);
render_manager()->DidCreateNavigationRequest(navigation_request_.get());
- // TODO(fdegans): Check if this is a same-document navigation and set the
- // proper argument.
- DidStartLoading(true, was_previously_loading);
+ bool is_same_document =
+ navigation_request_->request_params().is_same_document_fragment_change ||
+ navigation_request_->request_params().is_same_document_history_load;
+
+ DidStartLoading(!is_same_document, was_previously_loading);
}
void FrameTreeNode::ResetNavigationRequest(bool keep_state) {

Powered by Google App Engine
This is Rietveld 408576698