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

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

Issue 2944033002: PlzNavigate: improve bf navigations metrics (Closed)
Patch Set: Created 3 years, 6 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/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index af783af8f957c69c64180d685d385792af26f32a..0ca2425bbcdd949490b3a2406f4e1bd8c58a1dc5 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -715,7 +715,7 @@ void NavigationHandleImpl::ReadyToCommitNavigation(
ready_to_commit_time_ = base::TimeTicks::Now();
// For back-forward navigations, record metrics.
- if (transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) {
+ if ((transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) && !IsSameDocument()) {
bool is_same_process =
render_frame_host_->GetProcess()->GetID() ==
frame_tree_node_->current_frame_host()->GetProcess()->GetID();
@@ -756,7 +756,7 @@ void NavigationHandleImpl::DidCommitNavigation(
// For back-forward navigations, record metrics.
if ((transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) &&
- !ready_to_commit_time_.is_null()) {
+ !ready_to_commit_time_.is_null() && !IsSameDocument()) {
UMA_HISTOGRAM_TIMES("Navigation.BackForward.ReadyToCommitUntilCommit",
base::TimeTicks::Now() - ready_to_commit_time_);
}

Powered by Google App Engine
This is Rietveld 408576698