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

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

Issue 2524763002: make NavigationGesture part of public content API and use it outside content (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/plugins/flash_download_interception.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_load_metrics/page_load_tracker.cc
diff --git a/chrome/browser/page_load_metrics/page_load_tracker.cc b/chrome/browser/page_load_metrics/page_load_tracker.cc
index fa68a29219cbe453f9effabe0f40fb398bd64fad..2250361491b8722902705d6684fd596f4d8e2e95 100644
--- a/chrome/browser/page_load_metrics/page_load_tracker.cc
+++ b/chrome/browser/page_load_metrics/page_load_tracker.cc
@@ -88,14 +88,15 @@ void LogAbortChainSameURLHistogram(int aborted_chain_size_same_url) {
bool IsNavigationUserInitiated(content::NavigationHandle* handle) {
// TODO(crbug.com/617904): Browser initiated navigations should have
- // HasUserGesture() set to true. In the meantime, we consider all
- // browser-initiated navigations to be user initiated.
+ // GetNavigationGesture() return NavigationGestureUser. In the meantime, we
+ // consider all browser-initiated navigations to be user initiated.
//
// TODO(crbug.com/637345): Some browser-initiated navigations incorrectly
// report that they are renderer-initiated. We will currently report that
// these navigations are not user initiated, when in fact they are user
// initiated.
- return handle->HasUserGesture() || !handle->IsRendererInitiated();
+ return handle->GetNavigationGesture() == content::NavigationGestureUser ||
+ !handle->IsRendererInitiated();
}
namespace {
« no previous file with comments | « no previous file | chrome/browser/plugins/flash_download_interception.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698