Add a feature parameter to disable UI for IDN navigation suggestions
This CL adds a "metrics_only" parameter to IdnNavigationSuggestions feature. When set to "true",
the parameter will suppress the display of the "Did you mean to go to ..." UI and only
record metrics.
Bug: 843361,847662
Change-Id: Idb72225ff0fc2f011bd2c1ae5bb0ee7167d687ba
Reviewed-on: https://chromium-review.googlesource.com/1182123
Commit-Queue: Mustafa Emre Acer <[email protected]>
Reviewed-by: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#585360}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 91b566d..89bc5f6f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -485,6 +485,14 @@
};
#endif // OS_CHROMEOS
+const FeatureEntry::FeatureParam kIdnNavigationSuggestionsMetricsOnly[] = {
+ {"metrics_only", "true"},
+};
+
+const FeatureEntry::FeatureVariation kIdnNavigationSuggestionVariants[] = {
+ {"With Metrics Only", kIdnNavigationSuggestionsMetricsOnly,
+ base::size(kIdnNavigationSuggestionsMetricsOnly)}};
+
const FeatureEntry::Choice kExtensionContentVerificationChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
{flag_descriptions::kExtensionContentVerificationBootstrap,
@@ -4288,7 +4296,9 @@
{"enable-idn-navigation-suggestions",
flag_descriptions::kIdnNavigationSuggestionsName,
flag_descriptions::kIdnNavigationSuggestionsDescription, kOsDesktop,
- FEATURE_VALUE_TYPE(features::kIdnNavigationSuggestions)},
+ FEATURE_WITH_PARAMS_VALUE_TYPE(features::kIdnNavigationSuggestions,
+ kIdnNavigationSuggestionVariants,
+ "IdnNavigationSuggestions")},
#if defined(OS_ANDROID)
{"long-press-back-for-history",