Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2871)

Unified Diff: chrome/browser/about_flags.cc

Issue 2041783002: Preset variation parameters for NTPSnippets feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@about-flags-parameters
Patch Set: After code review Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e966ebd31b89309f6f7edf76e277b35c0944688b..5d27c2e34fa361a928fd3524dd8ea8bdba6a43ed 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,36 @@ const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = {
#endif // defined(OS_ANDROID)
#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationDefault[] = {
+ {"fetching_personalization", "both"},
+ {"fetching_host_restrict", "off"},
Marc Treib 2016/06/17 13:43:54 Hm, the "Default" variant should probably not list
jkrcal 2016/06/17 14:13:43 Good point, done. (I had actually to change the de
+};
+const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = {
+ {"fetching_personalization", "personal"},
+ {"fetching_host_restrict", "off"},
+};
+const FeatureEntry::FeatureParam
+ kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted[] = {
+ {"fetching_personalization", "non_personal"},
+ {"fetching_host_restrict", "on"},
+};
+const FeatureEntry::FeatureParam
+ kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted[] = {
+ {"fetching_personalization", "personal"},
+ {"fetching_host_restrict", "on"},
+};
+
+const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = {
+ {"", kNTPSnippetsFeatureVariationDefault, 2},
Marc Treib 2016/06/17 13:43:54 The "2"s here are for the number of parameters? Se
jkrcal 2016/06/17 14:13:43 I do not see it either as it is all statically def
Marc Treib 2016/06/17 15:14:50 Well, there's an arraysize() macro (in base/macros
+ {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal, 2},
+ {"only from most visited sites",
+ kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted, 2},
+ {"only personalized from most visited sites",
+ kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted, 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 +1838,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 +1916,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 +1935,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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698