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

Unified Diff: chrome/browser/about_flags.cc

Issue 2873423002: Omnibox UI Experiments: Add flag to change max autocomplete matches. (Closed)
Patch Set: format 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 059fe8234236edfad9fce6c86552575ba59fefa1..7059339706703340f7f4f1c662b41e2124c9949b 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -966,6 +966,30 @@ const FeatureEntry::Choice kEnableHeapProfilingChoices[] = {
switches::kEnableHeapProfiling,
switches::kEnableHeapProfilingTaskProfiler}};
+const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
+ {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
+const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
+ {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
+const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
+ {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
+const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
+ {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
+const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
+ {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "12"}};
Peter Kasting 2017/05/10 22:08:05 Why these choices? There are no odd numbers, for
tommycli 2017/05/10 22:44:29 Chosen pretty arbitrarily, since we can easily cha
+
+const FeatureEntry::FeatureVariation
+ kOmniboxUIMaxAutocompleteMatchesVariations[] = {
+ {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
+ arraysize(kOmniboxUIMaxAutocompleteMatches4), nullptr},
+ {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
+ arraysize(kOmniboxUIMaxAutocompleteMatches6), nullptr},
+ {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
+ arraysize(kOmniboxUIMaxAutocompleteMatches8), nullptr},
+ {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
+ arraysize(kOmniboxUIMaxAutocompleteMatches10), nullptr},
+ {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
+ arraysize(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
+
const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin4px[] = {
{OmniboxFieldTrial::kUIVerticalMarginParam, "4"}};
const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin8px[] = {
@@ -2860,6 +2884,14 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kShowCertLink)},
#endif
+ {"omnibox-ui-max-autocomplete-matches",
+ flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
+ flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription, kOsDesktop,
+ FEATURE_WITH_PARAMS_VALUE_TYPE(
+ omnibox::kUIExperimentMaxAutocompleteMatches,
+ kOmniboxUIMaxAutocompleteMatchesVariations,
+ "OmniboxUIMaxAutocompleteVariations")},
+
{"omnibox-ui-vertical-margin",
flag_descriptions::kOmniboxUIVerticalMarginName,
flag_descriptions::kOmniboxUIVerticalMarginDescription, kOsDesktop,
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | components/omnibox/browser/autocomplete_result.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698