| OLD | NEW |
| 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 Loading... |
| 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 kOmniboxUIVerticalMargin4px[] = { |
| 970 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "4"}}; |
| 971 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin8px[] = { |
| 972 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "8"}}; |
| 973 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin12px[] = { |
| 974 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "12"}}; |
| 975 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin16px[] = { |
| 976 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "16"}}; |
| 977 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin20px[] = { |
| 978 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "20"}}; |
| 979 |
| 980 const FeatureEntry::FeatureVariation kOmniboxUIVerticalMarginVariations[] = { |
| 981 {"4px vertical margin", kOmniboxUIVerticalMargin4px, |
| 982 arraysize(kOmniboxUIVerticalMargin4px), nullptr}, |
| 983 {"8px vertical margin", kOmniboxUIVerticalMargin8px, |
| 984 arraysize(kOmniboxUIVerticalMargin8px), nullptr}, |
| 985 {"12px vertical margin", kOmniboxUIVerticalMargin12px, |
| 986 arraysize(kOmniboxUIVerticalMargin12px), nullptr}, |
| 987 {"16px vertical margin", kOmniboxUIVerticalMargin16px, |
| 988 arraysize(kOmniboxUIVerticalMargin16px), nullptr}, |
| 989 {"20px vertical margin", kOmniboxUIVerticalMargin20px, |
| 990 arraysize(kOmniboxUIVerticalMargin20px), nullptr}}; |
| 991 |
| 969 // RECORDING USER METRICS FOR FLAGS: | 992 // RECORDING USER METRICS FOR FLAGS: |
| 970 // ----------------------------------------------------------------------------- | 993 // ----------------------------------------------------------------------------- |
| 971 // The first line of the entry is the internal name. | 994 // The first line of the entry is the internal name. |
| 972 // | 995 // |
| 973 // To add a new entry, add to the end of kFeatureEntries. There are two | 996 // To add a new entry, add to the end of kFeatureEntries. There are two |
| 974 // distinct types of entries: | 997 // distinct types of entries: |
| 975 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 998 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
| 976 // macro for this type supplying the command line to the macro. | 999 // macro for this type supplying the command line to the macro. |
| 977 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 1000 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 978 // deactivated state for this lab (i.e. no command line option). To specify | 1001 // deactivated state for this lab (i.e. no command line option). To specify |
| (...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName, | 2854 {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName, |
| 2832 flag_descriptions::kEnableHeapProfilingDescription, kOsAll, | 2855 flag_descriptions::kEnableHeapProfilingDescription, kOsAll, |
| 2833 MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)}, | 2856 MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)}, |
| 2834 | 2857 |
| 2835 #if defined(TOOLKIT_VIEWS) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 2858 #if defined(TOOLKIT_VIEWS) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| 2836 {"show-cert-link", flag_descriptions::kShowCertLinkOnPageInfoName, | 2859 {"show-cert-link", flag_descriptions::kShowCertLinkOnPageInfoName, |
| 2837 flag_descriptions::kShowCertLinkOnPageInfoDescription, kOsDesktop, | 2860 flag_descriptions::kShowCertLinkOnPageInfoDescription, kOsDesktop, |
| 2838 SINGLE_VALUE_TYPE(switches::kShowCertLink)}, | 2861 SINGLE_VALUE_TYPE(switches::kShowCertLink)}, |
| 2839 #endif | 2862 #endif |
| 2840 | 2863 |
| 2864 {"omnibox-ui-vertical-margin", |
| 2865 flag_descriptions::kOmniboxUIVerticalMarginName, |
| 2866 flag_descriptions::kOmniboxUIVerticalMarginDescription, kOsDesktop, |
| 2867 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kUIExperiments, |
| 2868 kOmniboxUIVerticalMarginVariations, |
| 2869 "OmniboxUIVerticalMarginVariations")}, |
| 2870 |
| 2841 {"use-suggestions-even-if-few", | 2871 {"use-suggestions-even-if-few", |
| 2842 flag_descriptions::kUseSuggestionsEvenIfFewFeatureName, | 2872 flag_descriptions::kUseSuggestionsEvenIfFewFeatureName, |
| 2843 flag_descriptions::kUseSuggestionsEvenIfFewFeatureDescription, kOsAll, | 2873 flag_descriptions::kUseSuggestionsEvenIfFewFeatureDescription, kOsAll, |
| 2844 FEATURE_VALUE_TYPE(suggestions::kUseSuggestionsEvenIfFewFeature)}, | 2874 FEATURE_VALUE_TYPE(suggestions::kUseSuggestionsEvenIfFewFeature)}, |
| 2845 | 2875 |
| 2846 {"enable-location-hard-reload", flag_descriptions::kLocationHardReloadName, | 2876 {"enable-location-hard-reload", flag_descriptions::kLocationHardReloadName, |
| 2847 flag_descriptions::kLocationHardReloadDescription, kOsAll, | 2877 flag_descriptions::kLocationHardReloadDescription, kOsAll, |
| 2848 FEATURE_VALUE_TYPE(features::kLocationHardReload)}, | 2878 FEATURE_VALUE_TYPE(features::kLocationHardReload)}, |
| 2849 | 2879 |
| 2850 {"capture-thumbnail-on-load-finished", | 2880 {"capture-thumbnail-on-load-finished", |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3070 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3100 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3071 | 3101 |
| 3072 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3102 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 3073 *count = arraysize(kFeatureEntries); | 3103 *count = arraysize(kFeatureEntries); |
| 3074 return kFeatureEntries; | 3104 return kFeatureEntries; |
| 3075 } | 3105 } |
| 3076 | 3106 |
| 3077 } // namespace testing | 3107 } // namespace testing |
| 3078 | 3108 |
| 3079 } // namespace about_flags | 3109 } // namespace about_flags |
| OLD | NEW |