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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 arraysize(kClientPlaceholdersForServerLoFiEnabled), nullptr}}; | 1096 arraysize(kClientPlaceholdersForServerLoFiEnabled), nullptr}}; |
1097 | 1097 |
1098 const FeatureEntry::Choice kAsyncImageDecodingChoices[] = { | 1098 const FeatureEntry::Choice kAsyncImageDecodingChoices[] = { |
1099 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, | 1099 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
1100 {flags_ui::kGenericExperimentChoiceEnabled, | 1100 {flags_ui::kGenericExperimentChoiceEnabled, |
1101 cc::switches::kEnableCheckerImaging, ""}, | 1101 cc::switches::kEnableCheckerImaging, ""}, |
1102 {flags_ui::kGenericExperimentChoiceDisabled, | 1102 {flags_ui::kGenericExperimentChoiceDisabled, |
1103 cc::switches::kDisableCheckerImaging, ""}, | 1103 cc::switches::kDisableCheckerImaging, ""}, |
1104 }; | 1104 }; |
1105 | 1105 |
| 1106 #define DEFINE_TDI_MODE_FEATURE_PARAM(name, value, description) \ |
| 1107 const FeatureEntry::FeatureParam kTopDocumentIsolationVariations_##name[] = \ |
| 1108 {{features::kTopDocumentIsolationModeParam, #value}}; |
| 1109 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_FEATURE_PARAM) |
| 1110 #undef DEFINE_TDI_MODE_FEATURE_PARAM |
| 1111 |
| 1112 const FeatureEntry::FeatureVariation kTopDocumentIsolationVariations[] = { |
| 1113 #define DEFINE_TDI_MODE_VARIATION(name, value, description) \ |
| 1114 {"(" #name " - " description ")", kTopDocumentIsolationVariations_##name, \ |
| 1115 arraysize(kTopDocumentIsolationVariations_##name), nullptr}, |
| 1116 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_VARIATION) |
| 1117 #undef DEFINE_TDI_MODE_VARIATION |
| 1118 }; |
| 1119 |
1106 // RECORDING USER METRICS FOR FLAGS: | 1120 // RECORDING USER METRICS FOR FLAGS: |
1107 // ----------------------------------------------------------------------------- | 1121 // ----------------------------------------------------------------------------- |
1108 // The first line of the entry is the internal name. | 1122 // The first line of the entry is the internal name. |
1109 // | 1123 // |
1110 // To add a new entry, add to the end of kFeatureEntries. There are two | 1124 // To add a new entry, add to the end of kFeatureEntries. There are two |
1111 // distinct types of entries: | 1125 // distinct types of entries: |
1112 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 1126 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
1113 // macro for this type supplying the command line to the macro. | 1127 // macro for this type supplying the command line to the macro. |
1114 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 1128 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
1115 // deactivated state for this lab (i.e. no command line option). To specify | 1129 // deactivated state for this lab (i.e. no command line option). To specify |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, | 1972 MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, |
1959 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName, | 1973 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName, |
1960 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll, | 1974 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll, |
1961 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)}, | 1975 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)}, |
1962 {"enable-site-per-process", flag_descriptions::kSitePerProcessName, | 1976 {"enable-site-per-process", flag_descriptions::kSitePerProcessName, |
1963 flag_descriptions::kSitePerProcessDescription, kOsAll, | 1977 flag_descriptions::kSitePerProcessDescription, kOsAll, |
1964 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, | 1978 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, |
1965 {"enable-top-document-isolation", | 1979 {"enable-top-document-isolation", |
1966 flag_descriptions::kTopDocumentIsolationName, | 1980 flag_descriptions::kTopDocumentIsolationName, |
1967 flag_descriptions::kTopDocumentIsolationDescription, kOsAll, | 1981 flag_descriptions::kTopDocumentIsolationDescription, kOsAll, |
1968 FEATURE_VALUE_TYPE(features::kTopDocumentIsolation)}, | 1982 FEATURE_WITH_PARAMS_VALUE_TYPE(features::kTopDocumentIsolation, |
| 1983 kTopDocumentIsolationVariations, |
| 1984 "TopDocumentIsolation")}, |
1969 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName, | 1985 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName, |
1970 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll, | 1986 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll, |
1971 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, | 1987 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, |
1972 #if defined(OS_MACOSX) | 1988 #if defined(OS_MACOSX) |
1973 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName, | 1989 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName, |
1974 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac, | 1990 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac, |
1975 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)}, | 1991 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)}, |
1976 #endif // OS_MACOSX | 1992 #endif // OS_MACOSX |
1977 {"data-reduction-proxy-lo-fi", | 1993 {"data-reduction-proxy-lo-fi", |
1978 flag_descriptions::kDataReductionProxyLoFiName, | 1994 flag_descriptions::kDataReductionProxyLoFiName, |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3430 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3446 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
3431 | 3447 |
3432 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3448 const FeatureEntry* GetFeatureEntries(size_t* count) { |
3433 *count = arraysize(kFeatureEntries); | 3449 *count = arraysize(kFeatureEntries); |
3434 return kFeatureEntries; | 3450 return kFeatureEntries; |
3435 } | 3451 } |
3436 | 3452 |
3437 } // namespace testing | 3453 } // namespace testing |
3438 | 3454 |
3439 } // namespace about_flags | 3455 } // namespace about_flags |
OLD | NEW |