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 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 {"fetching_personalization", "both"}, | |
| 518 {"fetching_host_restrict", "off"}, | |
| 519 }; | |
| 520 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { | |
| 521 {"fetching_personalization", "personal"}, | |
| 522 {"fetching_host_restrict", "off"}, | |
| 523 }; | |
| 524 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyTopSites[] = { | |
|
Marc Treib
2016/06/17 12:34:13
I find "TopSites" misleading here - we don't even
jkrcal
2016/06/17 13:18:52
Done.
| |
| 525 {"fetching_personalization", "both"}, | |
| 526 {"fetching_host_restrict", "on"}, | |
| 527 }; | |
| 528 const FeatureEntry::FeatureParam | |
| 529 kNTPSnippetsFeatureVariationOnlyPersonalTopSites[] = { | |
| 530 {"fetching_personalization", "non_personal"}, | |
|
Marc Treib
2016/06/17 12:34:13
This seems wrong; should probably be "personal"?
jkrcal
2016/06/17 13:18:52
Done.
(Huh, I had yet another mistake there compar
| |
| 531 {"fetching_host_restrict", "on"}, | |
| 532 }; | |
| 533 | |
| 534 const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = { | |
| 535 {"", kNTPSnippetsFeatureVariationDefault, 2}, | |
| 536 {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, 2}, | |
| 537 {"only from most visited sites", kNTPSnippetsFeatureVariationOnlyTopSites, | |
| 538 2}, | |
| 539 {"only personalized from most visited sites", | |
| 540 kNTPSnippetsFeatureVariationOnlyPersonalTopSites, 2}, | |
| 541 }; | |
| 542 #endif // defined(OS_ANDROID) | |
| 543 | |
| 544 #if defined(OS_ANDROID) | |
| 515 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { | 545 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { |
| 516 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, | 546 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, |
| 517 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, | 547 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, |
| 518 switches::kForceShowUpdateMenuItemSummary, ""}, | 548 switches::kForceShowUpdateMenuItemSummary, ""}, |
| 519 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, | 549 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, |
| 520 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, | 550 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, |
| 521 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, | 551 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, |
| 522 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, | 552 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, |
| 523 }; | 553 }; |
| 524 #endif // defined(OS_ANDROID) | 554 #endif // defined(OS_ANDROID) |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1800 extensions::switches::kDisableTabForDesktopShare)}, | 1830 extensions::switches::kDisableTabForDesktopShare)}, |
| 1801 {"disable-desktop-capture-picker-old-ui", | 1831 {"disable-desktop-capture-picker-old-ui", |
| 1802 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI, | 1832 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI, |
| 1803 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION, kOsAll, | 1833 IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION, kOsAll, |
| 1804 SINGLE_VALUE_TYPE( | 1834 SINGLE_VALUE_TYPE( |
| 1805 extensions::switches::kDisableDesktopCapturePickerOldUI)}, | 1835 extensions::switches::kDisableDesktopCapturePickerOldUI)}, |
| 1806 #endif | 1836 #endif |
| 1807 #if defined(OS_ANDROID) | 1837 #if defined(OS_ANDROID) |
| 1808 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, | 1838 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, |
| 1809 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, | 1839 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, |
| 1810 FEATURE_VALUE_TYPE(chrome::android::kNTPSnippetsFeature)}, | 1840 FEATURE_WITH_VARIATIONS_VALUE_TYPE(chrome::android::kNTPSnippetsFeature, |
| 1841 kNTPSnippetsFeatureVariations, | |
| 1842 ntp_snippets::kStudyName)}, | |
| 1811 #endif // defined(OS_ANDROID) | 1843 #endif // defined(OS_ANDROID) |
| 1812 #if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) | 1844 #if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) |
| 1813 {"enable-webrtc-h264-with-openh264-ffmpeg", | 1845 {"enable-webrtc-h264-with-openh264-ffmpeg", |
| 1814 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME, | 1846 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME, |
| 1815 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop, | 1847 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop, |
| 1816 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)}, | 1848 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)}, |
| 1817 #endif // defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) | 1849 #endif // defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) |
| 1818 #if defined(OS_ANDROID) | 1850 #if defined(OS_ANDROID) |
| 1819 {"ime-thread", IDS_FLAGS_IME_THREAD_NAME, IDS_FLAGS_IME_THREAD_DESCRIPTION, | 1851 {"ime-thread", IDS_FLAGS_IME_THREAD_NAME, IDS_FLAGS_IME_THREAD_DESCRIPTION, |
| 1820 kOsAndroid, FEATURE_VALUE_TYPE(features::kImeThread)}, | 1852 kOsAndroid, FEATURE_VALUE_TYPE(features::kImeThread)}, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1876 #endif | 1908 #endif |
| 1877 #if defined(OS_ANDROID) | 1909 #if defined(OS_ANDROID) |
| 1878 {"media-style-notification", IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_NAME, | 1910 {"media-style-notification", IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_NAME, |
| 1879 IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_DESCRIPTION, kOsAndroid, | 1911 IDS_FLAGS_MEDIA_STYLE_NOTIFICATION_DESCRIPTION, kOsAndroid, |
| 1880 FEATURE_VALUE_TYPE(chrome::android::kMediaStyleNotification)}, | 1912 FEATURE_VALUE_TYPE(chrome::android::kMediaStyleNotification)}, |
| 1881 {"important-sites-in-cbd", IDS_FLAGS_IMPORTANT_SITES_IN_CBD_NAME, | 1913 {"important-sites-in-cbd", IDS_FLAGS_IMPORTANT_SITES_IN_CBD_NAME, |
| 1882 IDS_FLAGS_IMPORTANT_SITES_IN_CBD_DESCRIPTION, kOsAndroid, | 1914 IDS_FLAGS_IMPORTANT_SITES_IN_CBD_DESCRIPTION, kOsAndroid, |
| 1883 FEATURE_VALUE_TYPE(chrome::android::kImportantSitesInCBD)}, | 1915 FEATURE_VALUE_TYPE(chrome::android::kImportantSitesInCBD)}, |
| 1884 {"enable-autoplay-muted-videos", | 1916 {"enable-autoplay-muted-videos", |
| 1885 IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_NAME, | 1917 IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_NAME, |
| 1886 IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_DESCRIPTION, | 1918 IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_DESCRIPTION, kOsAndroid, |
| 1887 kOsAndroid, | |
| 1888 SINGLE_VALUE_TYPE(switches::kEnableAutoplayMutedVideos)}, | 1919 SINGLE_VALUE_TYPE(switches::kEnableAutoplayMutedVideos)}, |
| 1889 #endif | 1920 #endif |
| 1890 {"enable-pointer-events", // FLAGS:RECORD_UMA | 1921 {"enable-pointer-events", // FLAGS:RECORD_UMA |
| 1891 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_NAME, | 1922 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_NAME, |
| 1892 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_DESCRIPTION, kOsAll, | 1923 IDS_FLAGS_EXPERIMENTAL_POINTER_EVENT_DESCRIPTION, kOsAll, |
| 1893 FEATURE_VALUE_TYPE(features::kPointerEvents)}, | 1924 FEATURE_VALUE_TYPE(features::kPointerEvents)}, |
| 1894 {"passive-listener-default", // FLAGS:RECORD_UMA | 1925 {"passive-listener-default", // FLAGS:RECORD_UMA |
| 1895 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_NAME, | 1926 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_NAME, |
| 1896 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_DESCRIPTION, kOsAll, | 1927 IDS_FLAGS_PASSIVE_EVENT_LISTENER_DEFAULT_DESCRIPTION, kOsAll, |
| 1897 MULTI_VALUE_TYPE(kPassiveListenersChoices)}, | 1928 MULTI_VALUE_TYPE(kPassiveListenersChoices)}, |
| 1898 {"enable-loading-ipc-optimization-for-small-resources", | 1929 {"enable-loading-ipc-optimization-for-small-resources", |
| 1899 IDS_FLAGS_OPTIMIZE_LOADING_IPC_FOR_SMALL_RESOURCES_NAME, | 1930 IDS_FLAGS_OPTIMIZE_LOADING_IPC_FOR_SMALL_RESOURCES_NAME, |
| 1900 IDS_FLAGS_OPTIMIZE_LOADING_IPC_FOR_SMALL_RESOURCES_DESCRIPTION, kOsAll, | 1931 IDS_FLAGS_OPTIMIZE_LOADING_IPC_FOR_SMALL_RESOURCES_DESCRIPTION, kOsAll, |
| 1901 FEATURE_VALUE_TYPE(features::kOptimizeLoadingIPCForSmallResources)}, | 1932 FEATURE_VALUE_TYPE(features::kOptimizeLoadingIPCForSmallResources)}, |
| 1902 {"enable-font-cache-scaling", IDS_FLAGS_FONT_CACHE_SCALING_NAME, | 1933 {"enable-font-cache-scaling", IDS_FLAGS_FONT_CACHE_SCALING_NAME, |
| 1903 IDS_FLAGS_FONT_CACHE_SCALING_DESCRIPTION, kOsAll, | 1934 IDS_FLAGS_FONT_CACHE_SCALING_DESCRIPTION, kOsAll, |
| 1904 FEATURE_VALUE_TYPE(features::kFontCacheScaling)}, | 1935 FEATURE_VALUE_TYPE(features::kFontCacheScaling)}, |
| 1905 #if defined(OS_ANDROID) | 1936 #if defined(OS_ANDROID) |
| 1906 {"enable-vr-shell", | 1937 {"enable-vr-shell", IDS_FLAGS_ENABLE_VR_SHELL_NAME, |
| 1907 IDS_FLAGS_ENABLE_VR_SHELL_NAME, | |
| 1908 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, | 1938 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, |
| 1909 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, | 1939 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, |
| 1910 switches::kDisableVrShell)}, | 1940 switches::kDisableVrShell)}, |
| 1911 #endif | 1941 #endif |
| 1912 | 1942 |
| 1913 {"enable-weak-memorycache", | 1943 {"enable-weak-memorycache", IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, |
| 1914 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, | |
| 1915 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, | 1944 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, |
| 1916 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, | 1945 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, |
| 1917 // NOTE: Adding new command-line switches requires adding corresponding | 1946 // NOTE: Adding new command-line switches requires adding corresponding |
| 1918 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 1947 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1919 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 1948 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 1920 }; | 1949 }; |
| 1921 | 1950 |
| 1922 class FlagsStateSingleton { | 1951 class FlagsStateSingleton { |
| 1923 public: | 1952 public: |
| 1924 FlagsStateSingleton() | 1953 FlagsStateSingleton() |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2112 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2141 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2113 | 2142 |
| 2114 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2143 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2115 *count = arraysize(kFeatureEntries); | 2144 *count = arraysize(kFeatureEntries); |
| 2116 return kFeatureEntries; | 2145 return kFeatureEntries; |
| 2117 } | 2146 } |
| 2118 | 2147 |
| 2119 } // namespace testing | 2148 } // namespace testing |
| 2120 | 2149 |
| 2121 } // namespace about_flags | 2150 } // namespace about_flags |
| OLD | NEW |