| 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 #endif // OS_CHROMEOS | 527 #endif // OS_CHROMEOS |
| 528 | 528 |
| 529 const FeatureEntry::Choice kForceUIDirectionChoices[] = { | 529 const FeatureEntry::Choice kForceUIDirectionChoices[] = { |
| 530 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, | 530 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 531 {flag_descriptions::kForceUiDirectionLtr, switches::kForceUIDirection, | 531 {flag_descriptions::kForceUiDirectionLtr, switches::kForceUIDirection, |
| 532 switches::kForceUIDirectionLTR}, | 532 switches::kForceUIDirectionLTR}, |
| 533 {flag_descriptions::kForceUiDirectionRtl, switches::kForceUIDirection, | 533 {flag_descriptions::kForceUiDirectionRtl, switches::kForceUIDirection, |
| 534 switches::kForceUIDirectionRTL}, | 534 switches::kForceUIDirectionRTL}, |
| 535 }; | 535 }; |
| 536 | 536 |
| 537 const FeatureEntry::Choice kForceTextDirectionChoices[] = { |
| 538 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 539 {flag_descriptions::kForceUiDirectionLtr, switches::kForceTextDirection, |
| 540 switches::kForceUIDirectionLTR}, |
| 541 {flag_descriptions::kForceUiDirectionRtl, switches::kForceTextDirection, |
| 542 switches::kForceUIDirectionRTL}, |
| 543 }; |
| 544 |
| 537 #if defined(OS_ANDROID) | 545 #if defined(OS_ANDROID) |
| 538 const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = { | 546 const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = { |
| 539 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, | 547 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 540 {flags_ui::kGenericExperimentChoiceDisabled, | 548 {flags_ui::kGenericExperimentChoiceDisabled, |
| 541 switches::kNtpSwitchToExistingTab, "disabled"}, | 549 switches::kNtpSwitchToExistingTab, "disabled"}, |
| 542 {flag_descriptions::kNtpSwitchToExistingTabMatchUrl, | 550 {flag_descriptions::kNtpSwitchToExistingTabMatchUrl, |
| 543 switches::kNtpSwitchToExistingTab, "url"}, | 551 switches::kNtpSwitchToExistingTab, "url"}, |
| 544 {flag_descriptions::kNtpSwitchToExistingTabMatchHost, | 552 {flag_descriptions::kNtpSwitchToExistingTabMatchHost, |
| 545 switches::kNtpSwitchToExistingTab, "host"}, | 553 switches::kNtpSwitchToExistingTab, "host"}, |
| 546 }; | 554 }; |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 {"enable-md-settings", flag_descriptions::kEnableMaterialDesignSettingsName, | 2078 {"enable-md-settings", flag_descriptions::kEnableMaterialDesignSettingsName, |
| 2071 flag_descriptions::kEnableMaterialDesignSettingsDescription, kOsDesktop, | 2079 flag_descriptions::kEnableMaterialDesignSettingsDescription, kOsDesktop, |
| 2072 FEATURE_VALUE_TYPE(features::kMaterialDesignSettings)}, | 2080 FEATURE_VALUE_TYPE(features::kMaterialDesignSettings)}, |
| 2073 {"safe-search-url-reporting", | 2081 {"safe-search-url-reporting", |
| 2074 flag_descriptions::kSafeSearchUrlReportingName, | 2082 flag_descriptions::kSafeSearchUrlReportingName, |
| 2075 flag_descriptions::kSafeSearchUrlReportingDescription, kOsAll, | 2083 flag_descriptions::kSafeSearchUrlReportingDescription, kOsAll, |
| 2076 FEATURE_VALUE_TYPE(features::kSafeSearchUrlReporting)}, | 2084 FEATURE_VALUE_TYPE(features::kSafeSearchUrlReporting)}, |
| 2077 {"force-ui-direction", flag_descriptions::kForceUiDirectionName, | 2085 {"force-ui-direction", flag_descriptions::kForceUiDirectionName, |
| 2078 flag_descriptions::kForceUiDirectionDescription, kOsAll, | 2086 flag_descriptions::kForceUiDirectionDescription, kOsAll, |
| 2079 MULTI_VALUE_TYPE(kForceUIDirectionChoices)}, | 2087 MULTI_VALUE_TYPE(kForceUIDirectionChoices)}, |
| 2088 {"force-text-direction", flag_descriptions::kForceTextDirectionName, |
| 2089 flag_descriptions::kForceTextDirectionDescription, kOsAll, |
| 2090 MULTI_VALUE_TYPE(kForceTextDirectionChoices)}, |
| 2080 #if BUILDFLAG(ENABLE_EXTENSIONS) | 2091 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 2081 {"enable-md-extensions", | 2092 {"enable-md-extensions", |
| 2082 flag_descriptions::kEnableMaterialDesignExtensionsName, | 2093 flag_descriptions::kEnableMaterialDesignExtensionsName, |
| 2083 flag_descriptions::kEnableMaterialDesignExtensionsDescription, kOsDesktop, | 2094 flag_descriptions::kEnableMaterialDesignExtensionsDescription, kOsDesktop, |
| 2084 FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)}, | 2095 FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)}, |
| 2085 #endif // ENABLE_EXTENSIONS | 2096 #endif // ENABLE_EXTENSIONS |
| 2086 #if defined(OS_WIN) || defined(OS_LINUX) | 2097 #if defined(OS_WIN) || defined(OS_LINUX) |
| 2087 {"enable-input-ime-api", flag_descriptions::kEnableInputImeApiName, | 2098 {"enable-input-ime-api", flag_descriptions::kEnableInputImeApiName, |
| 2088 flag_descriptions::kEnableInputImeApiDescription, kOsWin | kOsLinux, | 2099 flag_descriptions::kEnableInputImeApiDescription, kOsWin | kOsLinux, |
| 2089 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI, | 2100 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI, |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2961 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2972 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2962 | 2973 |
| 2963 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2974 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2964 *count = arraysize(kFeatureEntries); | 2975 *count = arraysize(kFeatureEntries); |
| 2965 return kFeatureEntries; | 2976 return kFeatureEntries; |
| 2966 } | 2977 } |
| 2967 | 2978 |
| 2968 } // namespace testing | 2979 } // namespace testing |
| 2969 | 2980 |
| 2970 } // namespace about_flags | 2981 } // namespace about_flags |
| OLD | NEW |