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

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
index d58dc7863da0d262e27148fad54783086fe82ccf..ba63fd9f6e830ed1cfb9d68dbd1a4b91c6e8bf65 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
@@ -119,8 +119,9 @@ bool MetricsWebContentsObserver::OnMessageReceived(
void MetricsWebContentsObserver::WillStartNavigationRequest(
content::NavigationHandle* navigation_handle) {
- // Same-page navigations should never go through WillStartNavigationRequest.
- DCHECK(!navigation_handle->IsSamePage());
+ // Same-document navigations should never go through
+ // WillStartNavigationRequest.
+ DCHECK(!navigation_handle->IsSameDocument());
if (!navigation_handle->IsInMainFrame())
return;
@@ -261,8 +262,9 @@ void MetricsWebContentsObserver::DidFinishNavigation(
std::move(provisional_loads_[navigation_handle]));
provisional_loads_.erase(navigation_handle);
- // Ignore same-page navigations.
- if (navigation_handle->HasCommitted() && navigation_handle->IsSamePage()) {
+ // Ignore same-document navigations.
+ if (navigation_handle->HasCommitted() &&
+ navigation_handle->IsSameDocument()) {
if (finished_nav)
finished_nav->StopTracking();
return;
@@ -545,7 +547,7 @@ bool MetricsWebContentsObserver::ShouldTrackNavigation(
content::NavigationHandle* navigation_handle) const {
DCHECK(navigation_handle->IsInMainFrame());
DCHECK(!navigation_handle->HasCommitted() ||
- !navigation_handle->IsSamePage());
+ !navigation_handle->IsSameDocument());
return BrowserPageTrackDecider(embedder_interface_.get(), web_contents(),
navigation_handle).ShouldTrack();

Powered by Google App Engine
This is Rietveld 408576698