Control frequency of NTP notifications by flag
This flag will be used to enable more notifications for a thorough
exercise of the code.
BUG=677975
Review-Url: https://codereview.chromium.org/2613863003
Cr-Commit-Position: refs/heads/master@{#444695}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 2a3aecd..1bbe0a8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -26,6 +26,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
+#include "chrome/browser/ntp_snippets/ntp_snippets_features.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_content_client.h"
@@ -535,6 +536,19 @@
#endif // OS_ANDROID
#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam
+ kContentSuggestionsNotificationsFeatureVariationAlways[] = {
+ {kContentSuggestionsNotificationsAlwaysNotifyParam, "true"}};
+
+const FeatureEntry::FeatureVariation
+ kContentSuggestionsNotificationsFeatureVariations[] = {
+ {"(notify always)",
+ kContentSuggestionsNotificationsFeatureVariationAlways,
+ arraysize(kContentSuggestionsNotificationsFeatureVariationAlways),
+ nullptr}};
+#endif // OS_ANDROID
+
+#if defined(OS_ANDROID)
const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationChromeReader[] = {
{"content_suggestions_backend", ntp_snippets::kChromeReaderServer}};
@@ -734,8 +748,7 @@
{"show-overdraw-feedback", IDS_FLAGS_SHOW_OVERDRAW_FEEDBACK,
IDS_FLAGS_SHOW_OVERDRAW_FEEDBACK_DESCRIPTION, kOsAll,
SINGLE_VALUE_TYPE(cc::switches::kShowOverdrawFeedback)},
- {"ui-disable-partial-swap",
- IDS_FLAGS_UI_PARTIAL_SWAP_NAME,
+ {"ui-disable-partial-swap", IDS_FLAGS_UI_PARTIAL_SWAP_NAME,
IDS_FLAGS_UI_PARTIAL_SWAP_DESCRIPTION, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -1050,8 +1063,7 @@
IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_NAME,
IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_DESCRIPTION, kOsCrOS,
MULTI_VALUE_TYPE(kAshMaterialDesignInkDropAnimationSpeed)},
- {"ui-slow-animations",
- IDS_FLAGS_UI_SLOW_ANIMATIONS_NAME,
+ {"ui-slow-animations", IDS_FLAGS_UI_SLOW_ANIMATIONS_NAME,
IDS_FLAGS_UI_SLOW_ANIMATIONS_DESCRIPTION, kOsCrOS,
SINGLE_VALUE_TYPE(switches::kUISlowAnimations)},
{"disable-cloud-import", IDS_FLAGS_CLOUD_IMPORT,
@@ -1914,6 +1926,13 @@
IDS_FLAGS_ENABLE_NTP_STANDALONE_SUGGESTIONS_UI_NAME,
IDS_FLAGS_ENABLE_NTP_STANDALONE_SUGGESTIONS_UI_DESCRIPTION, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kNTPSuggestionsStandaloneUIFeature)},
+ {"enable-ntp-suggestions-notifications",
+ IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_NAME,
+ IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_DESCRIPTION, kOsAndroid,
+ FEATURE_WITH_VARIATIONS_VALUE_TYPE(
+ kContentSuggestionsNotificationsFeature,
+ kContentSuggestionsNotificationsFeatureVariations,
+ ntp_snippets::kStudyName)},
#endif // OS_ANDROID
#if BUILDFLAG(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) && \
!defined(MEDIA_DISABLE_FFMPEG)
@@ -2186,7 +2205,6 @@
FEATURE_VALUE_TYPE(features::kLsdPermissionPrompt)},
#endif
-
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.