| Index: chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
|
| diff --git a/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h b/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
|
| index 789acec9300c0937d864059bd896f3b52757fe31..c94a83f5b8159bc7e35e18b5fd936fdecc626b01 100644
|
| --- a/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
|
| +++ b/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
|
| @@ -31,8 +31,10 @@ class DesktopEngagementService : public AudibleContentsTracker::Observer {
|
| // Called when user interaction with the browser is caught.
|
| void OnUserEvent();
|
|
|
| - // Called when visibility of the browser changes.
|
| - void OnVisibilityChanged(bool visible);
|
| + // Called when visibility of the browser changes. These events can be delayed
|
| + // due to timeout logic, the extent of which can be communicated via
|
| + // |time_ago|. This time is used to correct the session duration.
|
| + void OnVisibilityChanged(bool visible, base::TimeDelta time_ago);
|
|
|
| bool is_visible() const { return is_visible_; }
|
| bool in_session() const { return in_session_; }
|
| @@ -62,7 +64,9 @@ class DesktopEngagementService : public AudibleContentsTracker::Observer {
|
| void StartSession();
|
|
|
| // Ends the session and saves session information into histograms.
|
| - void EndSession();
|
| + // |time_to_discount| contains the amount of time that should be removed from
|
| + // the apparent session length due to timeout logic.
|
| + void EndSession(base::TimeDelta time_to_discount);
|
|
|
| // Sets |inactivity_timeout_| based on variation params.
|
| void InitInactivityTimeout();
|
|
|