| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 #include "chrome/browser/android/chrome_feature_list.h" | 108 #include "chrome/browser/android/chrome_feature_list.h" |
| 109 #include "components/feature_engagement_tracker/public/feature_constants.h" | 109 #include "components/feature_engagement_tracker/public/feature_constants.h" |
| 110 #include "components/feature_engagement_tracker/public/feature_list.h" | 110 #include "components/feature_engagement_tracker/public/feature_list.h" |
| 111 #else // OS_ANDROID | 111 #else // OS_ANDROID |
| 112 #include "ui/message_center/message_center_switches.h" | 112 #include "ui/message_center/message_center_switches.h" |
| 113 #endif // OS_ANDROID | 113 #endif // OS_ANDROID |
| 114 | 114 |
| 115 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
| 116 #include "chromeos/chromeos_switches.h" | 116 #include "chromeos/chromeos_switches.h" |
| 117 #include "components/arc/arc_features.h" | 117 #include "components/arc/arc_features.h" |
| 118 #include "components/ui_devtools/switches.h" |
| 118 #include "third_party/cros_system_api/switches/chrome_switches.h" | 119 #include "third_party/cros_system_api/switches/chrome_switches.h" |
| 119 #endif // OS_CHROMEOS | 120 #endif // OS_CHROMEOS |
| 120 | 121 |
| 121 #if defined(OS_MACOSX) | 122 #if defined(OS_MACOSX) |
| 122 #include "chrome/browser/ui/browser_dialogs.h" | 123 #include "chrome/browser/ui/browser_dialogs.h" |
| 123 #endif // OS_MACOSX | 124 #endif // OS_MACOSX |
| 124 | 125 |
| 125 #if BUILDFLAG(ENABLE_APP_LIST) | 126 #if BUILDFLAG(ENABLE_APP_LIST) |
| 126 #include "ui/app_list/app_list_switches.h" | 127 #include "ui/app_list/app_list_switches.h" |
| 127 #endif // ENABLE_APP_LIST | 128 #endif // ENABLE_APP_LIST |
| (...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2727 flag_descriptions::kEnableExpandedAutofillCreditCardPopupLayoutName, | 2728 flag_descriptions::kEnableExpandedAutofillCreditCardPopupLayoutName, |
| 2728 flag_descriptions::kEnableExpandedAutofillCreditCardPopupLayoutDescription, | 2729 flag_descriptions::kEnableExpandedAutofillCreditCardPopupLayoutDescription, |
| 2729 kOsAndroid, | 2730 kOsAndroid, |
| 2730 FEATURE_WITH_PARAMS_VALUE_TYPE( | 2731 FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 2731 autofill::kAutofillCreditCardPopupLayout, | 2732 autofill::kAutofillCreditCardPopupLayout, |
| 2732 kAutofillCreditCardPopupLayoutFeatureVariations, | 2733 kAutofillCreditCardPopupLayoutFeatureVariations, |
| 2733 // Must be AutofillCreditCardDropdownVariations to prevent DCHECK crash | 2734 // Must be AutofillCreditCardDropdownVariations to prevent DCHECK crash |
| 2734 // when the flag is manually enabled in a local build. | 2735 // when the flag is manually enabled in a local build. |
| 2735 "AutofillCreditCardDropdownVariations")}, | 2736 "AutofillCreditCardDropdownVariations")}, |
| 2736 #endif // OS_ANDROID | 2737 #endif // OS_ANDROID |
| 2738 |
| 2739 #if defined(OS_CHROMEOS) |
| 2740 {ui::devtools::kEnableUiDevTools, flag_descriptions::kUiDevToolsName, |
| 2741 flag_descriptions::kUiDevToolsDescription, kOsCrOS, |
| 2742 SINGLE_VALUE_TYPE(ui::devtools::kEnableUiDevTools)}, |
| 2743 #endif // defined(OS_CHROMEOS) |
| 2744 |
| 2737 {"enable-autofill-credit-card-last-used-date-display", | 2745 {"enable-autofill-credit-card-last-used-date-display", |
| 2738 flag_descriptions::kEnableAutofillCreditCardLastUsedDateDisplayName, | 2746 flag_descriptions::kEnableAutofillCreditCardLastUsedDateDisplayName, |
| 2739 flag_descriptions::kEnableAutofillCreditCardLastUsedDateDisplayDescription, | 2747 flag_descriptions::kEnableAutofillCreditCardLastUsedDateDisplayDescription, |
| 2740 kOsAll, | 2748 kOsAll, |
| 2741 FEATURE_WITH_PARAMS_VALUE_TYPE( | 2749 FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 2742 autofill::kAutofillCreditCardLastUsedDateDisplay, | 2750 autofill::kAutofillCreditCardLastUsedDateDisplay, |
| 2743 kAutofillCreditCardLastUsedDateFeatureVariations, | 2751 kAutofillCreditCardLastUsedDateFeatureVariations, |
| 2744 // Must be AutofillCreditCardDropdownVariations to prevent DCHECK crash | 2752 // Must be AutofillCreditCardDropdownVariations to prevent DCHECK crash |
| 2745 // when the flag is manually enabled in a local build. | 2753 // when the flag is manually enabled in a local build. |
| 2746 "AutofillCreditCardDropdownVariations")}, | 2754 "AutofillCreditCardDropdownVariations")}, |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 } | 3116 } |
| 3109 #endif // OS_ANDROID | 3117 #endif // OS_ANDROID |
| 3110 | 3118 |
| 3111 #if defined(OS_CHROMEOS) | 3119 #if defined(OS_CHROMEOS) |
| 3112 // Don't expose --mash/--mus outside of Canary or developer builds. | 3120 // Don't expose --mash/--mus outside of Canary or developer builds. |
| 3113 if (!strcmp("mus", entry.internal_name) && | 3121 if (!strcmp("mus", entry.internal_name) && |
| 3114 channel != version_info::Channel::DEV && | 3122 channel != version_info::Channel::DEV && |
| 3115 channel != version_info::Channel::UNKNOWN) { | 3123 channel != version_info::Channel::UNKNOWN) { |
| 3116 return true; | 3124 return true; |
| 3117 } | 3125 } |
| 3126 |
| 3127 // enable-ui-devtools is only available on for non Stable channels. |
| 3128 if (!strcmp(ui::devtools::kEnableUiDevTools, entry.internal_name) && |
| 3129 channel == version_info::Channel::STABLE) { |
| 3130 return true; |
| 3131 } |
| 3118 #endif // defined(OS_CHROMEOS) | 3132 #endif // defined(OS_CHROMEOS) |
| 3119 | 3133 |
| 3120 // data-reduction-proxy-lo-fi and enable-data-reduction-proxy-lite-page | 3134 // data-reduction-proxy-lo-fi and enable-data-reduction-proxy-lite-page |
| 3121 // are only available for Chromium builds and the Canary/Dev/Beta channels. | 3135 // are only available for Chromium builds and the Canary/Dev/Beta channels. |
| 3122 if ((!strcmp("data-reduction-proxy-lo-fi", entry.internal_name) || | 3136 if ((!strcmp("data-reduction-proxy-lo-fi", entry.internal_name) || |
| 3123 !strcmp("enable-data-reduction-proxy-lite-page", | 3137 !strcmp("enable-data-reduction-proxy-lite-page", |
| 3124 entry.internal_name)) && | 3138 entry.internal_name)) && |
| 3125 channel != version_info::Channel::BETA && | 3139 channel != version_info::Channel::BETA && |
| 3126 channel != version_info::Channel::DEV && | 3140 channel != version_info::Channel::DEV && |
| 3127 channel != version_info::Channel::CANARY && | 3141 channel != version_info::Channel::CANARY && |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3276 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3290 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3277 | 3291 |
| 3278 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3292 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 3279 *count = arraysize(kFeatureEntries); | 3293 *count = arraysize(kFeatureEntries); |
| 3280 return kFeatureEntries; | 3294 return kFeatureEntries; |
| 3281 } | 3295 } |
| 3282 | 3296 |
| 3283 } // namespace testing | 3297 } // namespace testing |
| 3284 | 3298 |
| 3285 } // namespace about_flags | 3299 } // namespace about_flags |
| OLD | NEW |