• dominickn's avatar
    Prevent site engagement scores from decaying when Chrome isn't in use. · 709246a0
    dominickn authored
    The site engagement service decays origins which have not been accessed
    in a week. However, if a user isn't using Chrome at all, the decay still
    occurs.
    
    This CL addresses this issue by persisting the last recorded time that
    any engagement occurred. If too long a period passes (currently 10 days)
    without *any* engagement, all scores have their last accessed time
    adjusted to be relative to some number of decay periods prior to now
    (currently set at 1 decay period), based on their offset to the last known
    engagement time.
    
    BUG=575504
    
    Review-Url: https://codereview.chromium.org/2082953002
    Cr-Commit-Position: refs/heads/master@{#402653}
    709246a0
site_engagement_service_unittest.cc 59.2 KB