| 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 26 matching lines...) Expand all Loading... |
| 37 #include "components/browser_sync/common/browser_sync_switches.h" | 37 #include "components/browser_sync/common/browser_sync_switches.h" |
| 38 #include "components/cloud_devices/common/cloud_devices_switches.h" | 38 #include "components/cloud_devices/common/cloud_devices_switches.h" |
| 39 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc
hes.h" | 39 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc
hes.h" |
| 40 #include "components/dom_distiller/core/dom_distiller_switches.h" | 40 #include "components/dom_distiller/core/dom_distiller_switches.h" |
| 41 #include "components/error_page/common/error_page_switches.h" | 41 #include "components/error_page/common/error_page_switches.h" |
| 42 #include "components/flags_ui/feature_entry_macros.h" | 42 #include "components/flags_ui/feature_entry_macros.h" |
| 43 #include "components/flags_ui/flags_storage.h" | 43 #include "components/flags_ui/flags_storage.h" |
| 44 #include "components/flags_ui/flags_ui_switches.h" | 44 #include "components/flags_ui/flags_ui_switches.h" |
| 45 #include "components/nacl/common/nacl_switches.h" | 45 #include "components/nacl/common/nacl_switches.h" |
| 46 #include "components/network_session_configurator/switches.h" | 46 #include "components/network_session_configurator/switches.h" |
| 47 #include "components/ntp_snippets/ntp_snippets_constants.h" |
| 47 #include "components/ntp_tiles/switches.h" | 48 #include "components/ntp_tiles/switches.h" |
| 48 #include "components/offline_pages/offline_page_feature.h" | 49 #include "components/offline_pages/offline_page_feature.h" |
| 49 #include "components/omnibox/browser/omnibox_switches.h" | 50 #include "components/omnibox/browser/omnibox_switches.h" |
| 50 #include "components/password_manager/core/common/password_manager_features.h" | 51 #include "components/password_manager/core/common/password_manager_features.h" |
| 51 #include "components/proximity_auth/switches.h" | 52 #include "components/proximity_auth/switches.h" |
| 52 #include "components/search/search_switches.h" | 53 #include "components/search/search_switches.h" |
| 53 #include "components/security_state/switches.h" | 54 #include "components/security_state/switches.h" |
| 54 #include "components/signin/core/common/signin_switches.h" | 55 #include "components/signin/core/common/signin_switches.h" |
| 55 #include "components/sync_driver/sync_driver_switches.h" | 56 #include "components/sync_driver/sync_driver_switches.h" |
| 56 #include "components/tracing/common/tracing_switches.h" | 57 #include "components/tracing/common/tracing_switches.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, | 506 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, |
| 506 "disabled"}, | 507 "disabled"}, |
| 507 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, | 508 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, |
| 508 switches::kNtpSwitchToExistingTab, "url"}, | 509 switches::kNtpSwitchToExistingTab, "url"}, |
| 509 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, | 510 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, |
| 510 switches::kNtpSwitchToExistingTab, "host"}, | 511 switches::kNtpSwitchToExistingTab, "host"}, |
| 511 }; | 512 }; |
| 512 #endif // defined(OS_ANDROID) | 513 #endif // defined(OS_ANDROID) |
| 513 | 514 |
| 514 #if defined(OS_ANDROID) | 515 #if defined(OS_ANDROID) |
| 516 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationDefault[] = {}; |
| 517 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { |
| 518 {"fetching_personalization", "personal"}, |
| 519 {"fetching_host_restrict", "off"}, |
| 520 }; |
| 521 const FeatureEntry::FeatureParam |
| 522 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted[] = { |
| 523 {"fetching_personalization", "non_personal"}, |
| 524 {"fetching_host_restrict", "on"}, |
| 525 }; |
| 526 const FeatureEntry::FeatureParam |
| 527 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted[] = { |
| 528 {"fetching_personalization", "personal"}, |
| 529 {"fetching_host_restrict", "on"}, |
| 530 }; |
| 531 |
| 532 // TODO(jkrcal) allow for nullptr instead of the empty array. |
| 533 const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = { |
| 534 {"", kNTPSnippetsFeatureVariationDefault, |
| 535 0}, |
| 536 {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, |
| 537 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, |
| 538 {"only from most visited sites", |
| 539 kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted, |
| 540 arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)}, |
| 541 {"only personalized from most visited sites", |
| 542 kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted, |
| 543 arraysize(kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted)}, |
| 544 }; |
| 545 #endif // defined(OS_ANDROID) |
| 546 |
| 547 #if defined(OS_ANDROID) |
| 515 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { | 548 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { |
| 516 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, | 549 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, |
| 517 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, | 550 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, |
| 518 switches::kForceShowUpdateMenuItemSummary, ""}, | 551 switches::kForceShowUpdateMenuItemSummary, ""}, |
| 519 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, | 552 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, |
| 520 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, | 553 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, |
| 521 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, | 554 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, |
| 522 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, | 555 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, |
| 523 }; | 556 }; |
| 524 #endif // defined(OS_ANDROID) | 557 #endif // defined(OS_ANDROID) |
| (...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 extensions::switches::kDisableTabForDesktopShare)}, | 1837 extensions::switches::kDisableTabForDesktopShare)}, |
| 1805 {"disable-desktop-capture-picker-old-ui", | 1838 {"disable-desktop-capture-picker-old-ui", |
| 1806 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI, | 1839 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI, |
| 1807 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION, kOsAll, | 1840 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION, kOsAll, |
| 1808 SINGLE_VALUE_TYPE( | 1841 SINGLE_VALUE_TYPE( |
| 1809 extensions::switches::kDisableDesktopCapturePickerOldUI)}, | 1842 extensions::switches::kDisableDesktopCapturePickerOldUI)}, |
| 1810 #endif | 1843 #endif |
| 1811 #if defined(OS_ANDROID) | 1844 #if defined(OS_ANDROID) |
| 1812 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, | 1845 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, |
| 1813 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, | 1846 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, |
| 1814 FEATURE_VALUE_TYPE(chrome::android::kNTPSnippetsFeature)}, | 1847 FEATURE_WITH_VARIATIONS_VALUE_TYPE(chrome::android::kNTPSnippetsFeature, |
| 1848 kNTPSnippetsFeatureVariations, |
| 1849 ntp_snippets::kStudyName)}, |
| 1815 #endif // defined(OS_ANDROID) | 1850 #endif // defined(OS_ANDROID) |
| 1816 #if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) | 1851 #if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) |
| 1817 {"enable-webrtc-h264-with-openh264-ffmpeg", | 1852 {"enable-webrtc-h264-with-openh264-ffmpeg", |
| 1818 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME, | 1853 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME, |
| 1819 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop, | 1854 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop, |
| 1820 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)}, | 1855 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)}, |
| 1821 #endif // defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) | 1856 #endif // defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) |
| 1822 #if defined(OS_ANDROID) | 1857 #if defined(OS_ANDROID) |
| 1823 {"ime-thread", IDS_FLAGS_IME_THREAD_NAME, IDS_FLAGS_IME_THREAD_DESCRIPTION, | 1858 {"ime-thread", IDS_FLAGS_IME_THREAD_NAME, IDS_FLAGS_IME_THREAD_DESCRIPTION, |
| 1824 kOsAndroid, FEATURE_VALUE_TYPE(features::kImeThread)}, | 1859 kOsAndroid, FEATURE_VALUE_TYPE(features::kImeThread)}, |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2160 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2126 | 2161 |
| 2127 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2162 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2128 *count = arraysize(kFeatureEntries); | 2163 *count = arraysize(kFeatureEntries); |
| 2129 return kFeatureEntries; | 2164 return kFeatureEntries; |
| 2130 } | 2165 } |
| 2131 | 2166 |
| 2132 } // namespace testing | 2167 } // namespace testing |
| 2133 | 2168 |
| 2134 } // namespace about_flags | 2169 } // namespace about_flags |
| OLD | NEW |