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

Unified Diff: chrome/browser/engagement/site_engagement_helper.cc

Issue 2104813002: Fix a bug in user input detection for the site engagement service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/engagement/site_engagement_helper.cc
diff --git a/chrome/browser/engagement/site_engagement_helper.cc b/chrome/browser/engagement/site_engagement_helper.cc
index ac3d3210ad43ae6523ed455f5198a1af48b6f491..d3bab2987a4b4c05ba9001c3a783a97f224b5315 100644
--- a/chrome/browser/engagement/site_engagement_helper.cc
+++ b/chrome/browser/engagement/site_engagement_helper.cc
@@ -187,9 +187,6 @@ void SiteEngagementService::Helper::RecordMediaPlaying(bool is_hidden) {
void SiteEngagementService::Helper::DidFinishNavigation(
content::NavigationHandle* handle) {
- input_tracker_.Stop();
- media_tracker_.Stop();
-
// Ignore all schemes except HTTP and HTTPS, as well as uncommitted, non
// main-frame, same page, or error page navigations.
record_engagement_ = handle->GetURL().SchemeIsHTTPOrHTTPS();
@@ -198,6 +195,9 @@ void SiteEngagementService::Helper::DidFinishNavigation(
return;
}
+ input_tracker_.Stop();
+ media_tracker_.Stop();
+
// Ignore prerender loads. This means that prerenders will not receive
// navigation engagement. The implications are as follows:
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698