diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-02 12:21:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-12 08:13:00 +0000 |
commit | 606d85f2a5386472314d39923da28c70c60dc8e7 (patch) | |
tree | a8f4d7bf997f349f45605e6058259fba0630e4d7 /chromium/components/feature_engagement/internal/once_condition_validator.cc | |
parent | 5786336dda477d04fb98483dca1a5426eebde2d7 (diff) | |
download | qtwebengine-chromium-606d85f2a5386472314d39923da28c70c60dc8e7.tar.gz |
BASELINE: Update Chromium to 96.0.4664.181
Change-Id: I762cd1da89d73aa6313b4a753fe126c34833f046
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/feature_engagement/internal/once_condition_validator.cc')
-rw-r--r-- | chromium/components/feature_engagement/internal/once_condition_validator.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chromium/components/feature_engagement/internal/once_condition_validator.cc b/chromium/components/feature_engagement/internal/once_condition_validator.cc index b12db874bd6..b1feb00312b 100644 --- a/chromium/components/feature_engagement/internal/once_condition_validator.cc +++ b/chromium/components/feature_engagement/internal/once_condition_validator.cc @@ -32,6 +32,16 @@ ConditionValidator::Result OnceConditionValidator::MeetsConditions( result.session_rate_ok = shown_features_.find(feature.name) == shown_features_.end(); + result.snooze_expiration_ok = + !event_model.IsSnoozeDismissed(config.trigger.name) && + (event_model.GetLastSnoozeTimestamp(config.trigger.name) < + base::Time::Now() - base::Days(config.snooze_params.snooze_interval)); + + result.should_show_snooze = + result.snooze_expiration_ok && + event_model.GetSnoozeCount(config.trigger.name, config.trigger.window, + current_day) < config.snooze_params.max_limit; + return result; } |