Chromium Code Reviews| Index: chrome/browser/about_flags.cc |
| diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
| index e966ebd31b89309f6f7edf76e277b35c0944688b..e7c95f76ffd32fe125117306fce4a11bd9e38305 100644 |
| --- a/chrome/browser/about_flags.cc |
| +++ b/chrome/browser/about_flags.cc |
| @@ -44,6 +44,7 @@ |
| #include "components/flags_ui/flags_ui_switches.h" |
| #include "components/nacl/common/nacl_switches.h" |
| #include "components/network_session_configurator/switches.h" |
| +#include "components/ntp_snippets/ntp_snippets_constants.h" |
| #include "components/ntp_tiles/switches.h" |
| #include "components/offline_pages/offline_page_feature.h" |
| #include "components/omnibox/browser/omnibox_switches.h" |
| @@ -512,6 +513,35 @@ const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = { |
| #endif // defined(OS_ANDROID) |
| #if defined(OS_ANDROID) |
| +const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationDefault[] = { |
| + {"fetching_personalization", "both"}, |
| + {"fetching_host_restrict", "off"}, |
| +}; |
| +const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { |
| + {"fetching_personalization", "personal"}, |
| + {"fetching_host_restrict", "off"}, |
| +}; |
| +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.
|
| + {"fetching_personalization", "both"}, |
| + {"fetching_host_restrict", "on"}, |
| +}; |
| +const FeatureEntry::FeatureParam |
| + kNTPSnippetsFeatureVariationOnlyPersonalTopSites[] = { |
| + {"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
|
| + {"fetching_host_restrict", "on"}, |
| +}; |
| + |
| +const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = { |
| + {"", kNTPSnippetsFeatureVariationDefault, 2}, |
| + {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, 2}, |
| + {"only from most visited sites", kNTPSnippetsFeatureVariationOnlyTopSites, |
| + 2}, |
| + {"only personalized from most visited sites", |
| + kNTPSnippetsFeatureVariationOnlyPersonalTopSites, 2}, |
| +}; |
| +#endif // defined(OS_ANDROID) |
| + |
| +#if defined(OS_ANDROID) |
| const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { |
| {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, |
| {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, |
| @@ -1807,7 +1837,9 @@ const FeatureEntry kFeatureEntries[] = { |
| #if defined(OS_ANDROID) |
| {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, |
| IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, |
| - FEATURE_VALUE_TYPE(chrome::android::kNTPSnippetsFeature)}, |
| + FEATURE_WITH_VARIATIONS_VALUE_TYPE(chrome::android::kNTPSnippetsFeature, |
| + kNTPSnippetsFeatureVariations, |
| + ntp_snippets::kStudyName)}, |
| #endif // defined(OS_ANDROID) |
| #if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) |
| {"enable-webrtc-h264-with-openh264-ffmpeg", |
| @@ -1883,8 +1915,7 @@ const FeatureEntry kFeatureEntries[] = { |
| FEATURE_VALUE_TYPE(chrome::android::kImportantSitesInCBD)}, |
| {"enable-autoplay-muted-videos", |
| IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_NAME, |
| - IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_DESCRIPTION, |
| - kOsAndroid, |
| + IDS_FLAGS_ENABLE_AUTOPLAY_MUTED_VIDEOS_DESCRIPTION, kOsAndroid, |
| SINGLE_VALUE_TYPE(switches::kEnableAutoplayMutedVideos)}, |
| #endif |
| {"enable-pointer-events", // FLAGS:RECORD_UMA |
| @@ -1903,15 +1934,13 @@ const FeatureEntry kFeatureEntries[] = { |
| IDS_FLAGS_FONT_CACHE_SCALING_DESCRIPTION, kOsAll, |
| FEATURE_VALUE_TYPE(features::kFontCacheScaling)}, |
| #if defined(OS_ANDROID) |
| - {"enable-vr-shell", |
| - IDS_FLAGS_ENABLE_VR_SHELL_NAME, |
| + {"enable-vr-shell", IDS_FLAGS_ENABLE_VR_SHELL_NAME, |
| IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, |
| ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, |
| switches::kDisableVrShell)}, |
| #endif |
| - {"enable-weak-memorycache", |
| - IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, |
| + {"enable-weak-memorycache", IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, |
| IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, |
| FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, |
| // NOTE: Adding new command-line switches requires adding corresponding |