Chromium Code Reviews| 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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 924 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = { | 924 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = { |
| 925 {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, | 925 {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, |
| 926 {flag_descriptions::kEnableHeapProfilingModePseudo, | 926 {flag_descriptions::kEnableHeapProfilingModePseudo, |
| 927 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo}, | 927 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo}, |
| 928 {flag_descriptions::kEnableHeapProfilingModeNative, | 928 {flag_descriptions::kEnableHeapProfilingModeNative, |
| 929 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative}, | 929 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative}, |
| 930 {flag_descriptions::kEnableHeapProfilingTaskProfiler, | 930 {flag_descriptions::kEnableHeapProfilingTaskProfiler, |
| 931 switches::kEnableHeapProfiling, | 931 switches::kEnableHeapProfiling, |
| 932 switches::kEnableHeapProfilingTaskProfiler}}; | 932 switches::kEnableHeapProfilingTaskProfiler}}; |
| 933 | 933 |
| 934 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin4px[] = { | |
| 935 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "4"}}; | |
| 936 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin8px[] = { | |
| 937 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "8"}}; | |
| 938 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin12px[] = { | |
| 939 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "12"}}; | |
| 940 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin16px[] = { | |
| 941 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "16"}}; | |
| 942 const FeatureEntry::FeatureParam kOmniboxUIVerticalMargin20px[] = { | |
| 943 {OmniboxFieldTrial::kUIExperimentsVerticalMarginParam, "20"}}; | |
| 944 | |
| 945 const FeatureEntry::FeatureVariation kOmniboxUIVerticalMarginVariations[] = { | |
| 946 {"4px vertical margin", kOmniboxUIVerticalMargin4px, | |
| 947 arraysize(kOmniboxUIVerticalMargin4px), nullptr}, | |
| 948 {"8px vertical margin", kOmniboxUIVerticalMargin8px, | |
| 949 arraysize(kOmniboxUIVerticalMargin8px), nullptr}, | |
| 950 {"12px vertical margin", kOmniboxUIVerticalMargin12px, | |
| 951 arraysize(kOmniboxUIVerticalMargin12px), nullptr}, | |
| 952 {"16px vertical margin", kOmniboxUIVerticalMargin16px, | |
| 953 arraysize(kOmniboxUIVerticalMargin16px), nullptr}, | |
| 954 {"20px vertical margin", kOmniboxUIVerticalMargin20px, | |
| 955 arraysize(kOmniboxUIVerticalMargin20px), nullptr}}; | |
| 956 | |
| 934 // RECORDING USER METRICS FOR FLAGS: | 957 // RECORDING USER METRICS FOR FLAGS: |
| 935 // ----------------------------------------------------------------------------- | 958 // ----------------------------------------------------------------------------- |
| 936 // The first line of the entry is the internal name. | 959 // The first line of the entry is the internal name. |
| 937 // | 960 // |
| 938 // To add a new entry, add to the end of kFeatureEntries. There are two | 961 // To add a new entry, add to the end of kFeatureEntries. There are two |
| 939 // distinct types of entries: | 962 // distinct types of entries: |
| 940 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 963 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
| 941 // macro for this type supplying the command line to the macro. | 964 // macro for this type supplying the command line to the macro. |
| 942 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 965 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 943 // deactivated state for this lab (i.e. no command line option). To specify | 966 // deactivated state for this lab (i.e. no command line option). To specify |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2736 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName, | 2759 {"enable-copyless-paste", flag_descriptions::kEnableCopylessPasteName, |
| 2737 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid, | 2760 flag_descriptions::kEnableCopylessPasteDescription, kOsAndroid, |
| 2738 FEATURE_VALUE_TYPE(features::kCopylessPaste)}, | 2761 FEATURE_VALUE_TYPE(features::kCopylessPaste)}, |
| 2739 #endif | 2762 #endif |
| 2740 | 2763 |
| 2741 {"omnibox-display-title-for-current-url", | 2764 {"omnibox-display-title-for-current-url", |
| 2742 flag_descriptions::kOmniboxDisplayTitleForCurrentUrlName, | 2765 flag_descriptions::kOmniboxDisplayTitleForCurrentUrlName, |
| 2743 flag_descriptions::kOmniboxDisplayTitleForCurrentUrlDescription, | 2766 flag_descriptions::kOmniboxDisplayTitleForCurrentUrlDescription, |
| 2744 kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kDisplayTitleForCurrentUrl)}, | 2767 kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kDisplayTitleForCurrentUrl)}, |
| 2745 | 2768 |
| 2769 {"omnibox-ui-vertical-margin", | |
|
Mark P
2017/05/03 18:38:59
nit: We're supposed to put new entries at the end.
tommycli
2017/05/03 18:49:46
Done.
| |
| 2770 flag_descriptions::kOmniboxUIVerticalMarginName, | |
| 2771 flag_descriptions::kOmniboxUIVerticalMarginDescription, kOsDesktop, | |
| 2772 FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kUIExperiments, | |
| 2773 kOmniboxUIVerticalMarginVariations, | |
| 2774 "OmniboxUIVerticalMarginVariations")}, | |
| 2775 | |
| 2746 {"enable-color-correct-rendering", | 2776 {"enable-color-correct-rendering", |
| 2747 flag_descriptions::kColorCorrectRenderingName, | 2777 flag_descriptions::kColorCorrectRenderingName, |
| 2748 flag_descriptions::kColorCorrectRenderingDescription, kOsAll, | 2778 flag_descriptions::kColorCorrectRenderingDescription, kOsAll, |
| 2749 MULTI_VALUE_TYPE(kColorCorrectRenderingChoices)}, | 2779 MULTI_VALUE_TYPE(kColorCorrectRenderingChoices)}, |
| 2750 | 2780 |
| 2751 #if defined(OS_CHROMEOS) | 2781 #if defined(OS_CHROMEOS) |
| 2752 {"quick-unlock-pin-signin", flag_descriptions::kQuickUnlockPinSignin, | 2782 {"quick-unlock-pin-signin", flag_descriptions::kQuickUnlockPinSignin, |
| 2753 flag_descriptions::kQuickUnlockPinSigninDescription, kOsCrOS, | 2783 flag_descriptions::kQuickUnlockPinSigninDescription, kOsCrOS, |
| 2754 FEATURE_VALUE_TYPE(features::kQuickUnlockPinSignin)}, | 2784 FEATURE_VALUE_TYPE(features::kQuickUnlockPinSignin)}, |
| 2755 #endif // OS_CHROMEOS | 2785 #endif // OS_CHROMEOS |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3004 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3034 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3005 | 3035 |
| 3006 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3036 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 3007 *count = arraysize(kFeatureEntries); | 3037 *count = arraysize(kFeatureEntries); |
| 3008 return kFeatureEntries; | 3038 return kFeatureEntries; |
| 3009 } | 3039 } |
| 3010 | 3040 |
| 3011 } // namespace testing | 3041 } // namespace testing |
| 3012 | 3042 |
| 3013 } // namespace about_flags | 3043 } // namespace about_flags |
| OLD | NEW |