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

Unified Diff: chrome/browser/about_flags.cc

Issue 2874933008: Adds animation as feature variation to keyboard accessory. (Closed)
Patch Set: Switch to base/metrics/field_trial_params.h API from variations:: Created 3 years, 7 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
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 4db353e1c4d3ce3f94b94e70e90d52a586841c54..b4a94ba0122fef59797597cd10f4d5413a1dba7c 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -39,6 +39,7 @@
#include "chrome/grit/chromium_strings.h"
#include "components/autofill/core/browser/autofill_experiments.h"
#include "components/autofill/core/common/autofill_switches.h"
+#include "components/autofill/core/common/autofill_util.h"
#include "components/browser_sync/browser_sync_switches.h"
#include "components/cloud_devices/common/cloud_devices_switches.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
@@ -843,6 +844,40 @@ kAutofillCreditCardPopupLayoutFeatureVariations[] = {
kAutofillCreditCardPopupLayoutFeatureVariationExpanded,
arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded),
nullptr}};
+
+const FeatureEntry::FeatureParam
+ kAutofillKeyboardAccessoryFeatureVariationAnimationDuration[] = {
+ {autofill::kAutofillKeyboardAccessoryAnimationDurationKey, "1000"}};
+
+const FeatureEntry::FeatureParam
+ kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth[] = {
+ {autofill::kAutofillKeyboardAccessoryLimitLabelWidthKey, "true"}};
+
+const FeatureEntry::FeatureParam
+ kAutofillKeyboardAccessoryFeatureVariationShowHint[] = {
+ {autofill::kAutofillKeyboardAccessoryHintKey, "true"}};
+
+const FeatureEntry::FeatureParam
+ kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint[] = {
+ {autofill::kAutofillKeyboardAccessoryAnimationDurationKey, "1000"},
+ {autofill::kAutofillKeyboardAccessoryHintKey, "true"}};
+
+const FeatureEntry::FeatureVariation
+ kAutofillKeyboardAccessoryFeatureVariations[] = {
+ {"Animate", kAutofillKeyboardAccessoryFeatureVariationAnimationDuration,
+ arraysize(kAutofillKeyboardAccessoryFeatureVariationAnimationDuration),
+ nullptr},
+ {"Limit label width",
+ kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth,
+ arraysize(kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth),
+ nullptr},
+ {"Show hint", kAutofillKeyboardAccessoryFeatureVariationShowHint,
+ arraysize(kAutofillKeyboardAccessoryFeatureVariationShowHint),
+ nullptr},
+ {"Animate with hint",
+ kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint,
+ arraysize(kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint),
+ nullptr}};
#endif // OS_ANDROID
const FeatureEntry::FeatureParam
@@ -1950,12 +1985,12 @@ const FeatureEntry kFeatureEntries[] = {
MULTI_VALUE_TYPE(kDataSaverPromptChoices)},
#endif // OS_CHROMEOS
#if defined(OS_ANDROID)
- {"enable-autofill-keyboard-accessory-view",
+ {"autofill-keyboard-accessory-view",
flag_descriptions::kAutofillAccessoryViewName,
flag_descriptions::kAutofillAccessoryViewDescription, kOsAndroid,
- ENABLE_DISABLE_VALUE_TYPE(
- autofill::switches::kEnableAccessorySuggestionView,
- autofill::switches::kDisableAccessorySuggestionView)},
+ FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::kAutofillKeyboardAccessory,
+ kAutofillKeyboardAccessoryFeatureVariations,
+ "AutofillKeyboardAccessoryVariations")},
#endif // OS_ANDROID
#if defined(OS_WIN)
{"try-supported-channel-layouts",

Powered by Google App Engine
This is Rietveld 408576698