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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = { 959 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = {
960 {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, 960 {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
961 {flag_descriptions::kEnableHeapProfilingModePseudo, 961 {flag_descriptions::kEnableHeapProfilingModePseudo,
962 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo}, 962 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo},
963 {flag_descriptions::kEnableHeapProfilingModeNative, 963 {flag_descriptions::kEnableHeapProfilingModeNative,
964 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative}, 964 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative},
965 {flag_descriptions::kEnableHeapProfilingTaskProfiler, 965 {flag_descriptions::kEnableHeapProfilingTaskProfiler,
966 switches::kEnableHeapProfiling, 966 switches::kEnableHeapProfiling,
967 switches::kEnableHeapProfilingTaskProfiler}}; 967 switches::kEnableHeapProfilingTaskProfiler}};
968 968
969 const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
970 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "4"}};
971 const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches6[] = {
972 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "6"}};
973 const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches8[] = {
974 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "8"}};
975 const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches10[] = {
976 {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "10"}};
977 const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches12[] = {
978 {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
979
980 const FeatureEntry::FeatureVariation
981 kOmniboxUIMaxAutocompleteMatchesVariations[] = {
982 {"4 matches", kOmniboxUIMaxAutocompleteMatches4,
983 arraysize(kOmniboxUIMaxAutocompleteMatches4), nullptr},
984 {"6 matches", kOmniboxUIMaxAutocompleteMatches6,
985 arraysize(kOmniboxUIMaxAutocompleteMatches6), nullptr},
986 {"8 matches", kOmniboxUIMaxAutocompleteMatches8,
987 arraysize(kOmniboxUIMaxAutocompleteMatches8), nullptr},
988 {"10 matches", kOmniboxUIMaxAutocompleteMatches10,
989 arraysize(kOmniboxUIMaxAutocompleteMatches10), nullptr},
990 {"12 matches", kOmniboxUIMaxAutocompleteMatches12,
991 arraysize(kOmniboxUIMaxAutocompleteMatches12), nullptr}};
992
969 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin4px[] = { 993 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin4px[] = {
970 {OmniboxFieldTrial::kUIVerticalMarginParam, "4"}}; 994 {OmniboxFieldTrial::kUIVerticalMarginParam, "4"}};
971 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin8px[] = { 995 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin8px[] = {
972 {OmniboxFieldTrial::kUIVerticalMarginParam, "8"}}; 996 {OmniboxFieldTrial::kUIVerticalMarginParam, "8"}};
973 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin12px[] = { 997 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin12px[] = {
974 {OmniboxFieldTrial::kUIVerticalMarginParam, "12"}}; 998 {OmniboxFieldTrial::kUIVerticalMarginParam, "12"}};
975 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin16px[] = { 999 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin16px[] = {
976 {OmniboxFieldTrial::kUIVerticalMarginParam, "16"}}; 1000 {OmniboxFieldTrial::kUIVerticalMarginParam, "16"}};
977 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin20px[] = { 1001 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin20px[] = {
978 {OmniboxFieldTrial::kUIVerticalMarginParam, "20"}}; 1002 {OmniboxFieldTrial::kUIVerticalMarginParam, "20"}};
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName, 2877 {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName,
2854 flag_descriptions::kEnableHeapProfilingDescription, kOsAll, 2878 flag_descriptions::kEnableHeapProfilingDescription, kOsAll,
2855 MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)}, 2879 MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)},
2856 2880
2857 #if defined(TOOLKIT_VIEWS) || (defined(OS_MACOSX) && !defined(OS_IOS)) 2881 #if defined(TOOLKIT_VIEWS) || (defined(OS_MACOSX) && !defined(OS_IOS))
2858 {"show-cert-link", flag_descriptions::kShowCertLinkOnPageInfoName, 2882 {"show-cert-link", flag_descriptions::kShowCertLinkOnPageInfoName,
2859 flag_descriptions::kShowCertLinkOnPageInfoDescription, kOsDesktop, 2883 flag_descriptions::kShowCertLinkOnPageInfoDescription, kOsDesktop,
2860 SINGLE_VALUE_TYPE(switches::kShowCertLink)}, 2884 SINGLE_VALUE_TYPE(switches::kShowCertLink)},
2861 #endif 2885 #endif
2862 2886
2887 {"omnibox-ui-max-autocomplete-matches",
2888 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesName,
2889 flag_descriptions::kOmniboxUIMaxAutocompleteMatchesDescription, kOsDesktop,
2890 FEATURE_WITH_PARAMS_VALUE_TYPE(
2891 omnibox::kUIExperimentMaxAutocompleteMatches,
2892 kOmniboxUIMaxAutocompleteMatchesVariations,
2893 "OmniboxUIMaxAutocompleteVariations")},
2894
2863 {"omnibox-ui-vertical-margin", 2895 {"omnibox-ui-vertical-margin",
2864 flag_descriptions::kOmniboxUIVerticalMarginName, 2896 flag_descriptions::kOmniboxUIVerticalMarginName,
2865 flag_descriptions::kOmniboxUIVerticalMarginDescription, kOsDesktop, 2897 flag_descriptions::kOmniboxUIVerticalMarginDescription, kOsDesktop,
2866 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kUIExperimentVerticalMargin, 2898 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kUIExperimentVerticalMargin,
2867 kOmniboxUIVerticalMarginVariations, 2899 kOmniboxUIVerticalMarginVariations,
2868 "OmniboxUIVerticalMarginVariations")}, 2900 "OmniboxUIVerticalMarginVariations")},
2869 2901
2870 {"use-suggestions-even-if-few", 2902 {"use-suggestions-even-if-few",
2871 flag_descriptions::kUseSuggestionsEvenIfFewFeatureName, 2903 flag_descriptions::kUseSuggestionsEvenIfFewFeatureName,
2872 flag_descriptions::kUseSuggestionsEvenIfFewFeatureDescription, kOsAll, 2904 flag_descriptions::kUseSuggestionsEvenIfFewFeatureDescription, kOsAll,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
3099 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3131 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3100 3132
3101 const FeatureEntry* GetFeatureEntries(size_t* count) { 3133 const FeatureEntry* GetFeatureEntries(size_t* count) {
3102 *count = arraysize(kFeatureEntries); 3134 *count = arraysize(kFeatureEntries);
3103 return kFeatureEntries; 3135 return kFeatureEntries;
3104 } 3136 }
3105 3137
3106 } // namespace testing 3138 } // namespace testing
3107 3139
3108 } // namespace about_flags 3140 } // namespace about_flags
OLDNEW
« 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