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

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

Issue 2793863002: Revert of Remove the 10 second delay before user input generates engagement. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/engagement/site_engagement_helper.h ('k') | 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 166b8f398eaff8c27b285a9622f4fe8226aa066b..dbef378f26fe037033dba077e6ab050ed5bd2547 100644
--- a/chrome/browser/engagement/site_engagement_helper.cc
+++ b/chrome/browser/engagement/site_engagement_helper.cc
@@ -23,6 +23,7 @@
namespace {
int g_seconds_to_pause_engagement_detection = 10;
+int g_seconds_delay_after_navigation = 10;
int g_seconds_delay_after_media_starts = 10;
int g_seconds_delay_after_show = 5;
@@ -34,6 +35,12 @@
void SiteEngagementService::Helper::SetSecondsBetweenUserInputCheck(
int seconds) {
g_seconds_to_pause_engagement_detection = seconds;
+}
+
+// static
+void SiteEngagementService::Helper::SetSecondsTrackingDelayAfterNavigation(
+ int seconds) {
+ g_seconds_delay_after_navigation = seconds;
}
// static
@@ -260,7 +267,8 @@
service_->HandleNavigation(web_contents(), handle->GetPageTransition());
- input_tracker_.Start(base::TimeDelta::FromSeconds(0));
+ input_tracker_.Start(
+ base::TimeDelta::FromSeconds(g_seconds_delay_after_navigation));
}
void SiteEngagementService::Helper::ReadyToCommitNavigation(
« no previous file with comments | « chrome/browser/engagement/site_engagement_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698