Commit 24c74a5e authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

IPH bubbles for Passwords Account Storage: Change timeouts

The default timeout values are 10s without interaction, or 3s after
mouseover. That's a bit short for this IPH bubble, so this CL changes
the values to 30s/10s, and also makes the configurable via a variation
param.

Bug: 1115476
Change-Id: Ifa80371e4126c9ba21f0651e64ec68f18f9f36c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363755
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800521}
parent 662dbd52
...@@ -312,6 +312,18 @@ std::unique_ptr<views::View> CreateHeaderImage(int image_id) { ...@@ -312,6 +312,18 @@ std::unique_ptr<views::View> CreateHeaderImage(int image_id) {
return image_view; return image_view;
} }
base::TimeDelta GetRegularIPHTimeout() {
return base::TimeDelta::FromSeconds(base::GetFieldTrialParamByFeatureAsInt(
feature_engagement::kIPHPasswordsAccountStorageFeature,
"account_storage_iph_timeout_seconds_regular", 30));
}
base::TimeDelta GetShortIPHTimeout() {
return base::TimeDelta::FromSeconds(base::GetFieldTrialParamByFeatureAsInt(
feature_engagement::kIPHPasswordsAccountStorageFeature,
"account_storage_iph_timeout_seconds_short", 10));
}
} // namespace } // namespace
// TODO(crbug.com/1077706): come up with a more general solution for this. // TODO(crbug.com/1077706): come up with a more general solution for this.
...@@ -733,6 +745,8 @@ void PasswordSaveUpdateWithAccountStoreView::ShowIPH(IPHType type) { ...@@ -733,6 +745,8 @@ void PasswordSaveUpdateWithAccountStoreView::ShowIPH(IPHType type) {
bubble_params.preferred_width = kAccountStoragePromoWidth; bubble_params.preferred_width = kAccountStoragePromoWidth;
bubble_params.activation_action = bubble_params.activation_action =
FeaturePromoBubbleParams::ActivationAction::ACTIVATE; FeaturePromoBubbleParams::ActivationAction::ACTIVATE;
bubble_params.timeout_default = GetRegularIPHTimeout();
bubble_params.timeout_short = GetShortIPHTimeout();
account_storage_promo_ = account_storage_promo_ =
FeaturePromoBubbleView::Create(std::move(bubble_params)); FeaturePromoBubbleView::Create(std::move(bubble_params));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment