1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_SEGMENTATION_PLATFORM_PUBLIC_FEATURES_H_
#define COMPONENTS_SEGMENTATION_PLATFORM_PUBLIC_FEATURES_H_
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
// Feature flags for the segmentation platform. Don't remove these feature flags.
namespace segmentation_platform::features {
// Core feature flag for segmentation platform.
BASE_DECLARE_FEATURE(kSegmentationPlatformFeature);
// Feature flag for enabling UKM based engine.
BASE_DECLARE_FEATURE(kSegmentationPlatformUkmEngine);
// Feature flag to increase segmentation platform background processing task
// runner priority.
BASE_DECLARE_FEATURE(kSegmentationPlatformUserVisibleTaskRunner);
// Feature flag for enabling adaptive toolbar v2 multi-output model.
BASE_DECLARE_FEATURE(kSegmentationPlatformAdaptiveToolbarV2Feature);
// Feature flag for enabling low engagement segmentation key.
BASE_DECLARE_FEATURE(kSegmentationPlatformLowEngagementFeature);
// Feature flag for enabling Feed user segments feature.
BASE_DECLARE_FEATURE(kSegmentationPlatformFeedSegmentFeature);
// Feature flag for enabling categorization into resume heavy user.
BASE_DECLARE_FEATURE(kResumeHeavyUserSegmentFeature);
// Feature flag for enabling Power user segmentation.
BASE_DECLARE_FEATURE(kSegmentationPlatformPowerUserFeature);
// Feature flag for enabling frequent feature user segment.
BASE_DECLARE_FEATURE(kFrequentFeatureUserSegmentFeature);
// Feature flag for enabling contextual page actions. Do not remove this, as all
// segmentation platform powered functionalities must be behind a base::Feature.
BASE_DECLARE_FEATURE(kContextualPageActions);
// Feature flag for enabling search user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformSearchUser);
// Feature flag for device switcher segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformDeviceSwitcher);
// Feature flag for enabling reader mode action feature.
BASE_DECLARE_FEATURE(kContextualPageActionShareModel);
// Feature flag for enabling tab grouping action feature.
BASE_DECLARE_FEATURE(kContextualPageActionTabGrouping);
// Feature flag for enabling shopping user segment feature.
BASE_DECLARE_FEATURE(kShoppingUserSegmentFeature);
// Feature flag for enabling default reporting segments.
BASE_DECLARE_FEATURE(kSegmentationDefaultReportingSegments);
// Feature flag for enabling device tier segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformDeviceTier);
// Feature flag for enabling tablet productivity user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformTabletProductivityUser);
// Feature flag for enabling model execution report sampling.
BASE_DECLARE_FEATURE(kSegmentationPlatformModelExecutionSampling);
// Feature flag for enabling cross device user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformCrossDeviceUser);
// Feature flag for enabling intentional user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformIntentionalUser);
// Feature flag for enabling password manager user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformPasswordManagerUser);
// Feature flag for enabling tab resumption ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformTabResumptionRanker);
// Feature flag for enabling ios module ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformIosModuleRanker);
// Feature flag for enabling android home module ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformAndroidHomeModuleRanker);
// Feature flag for enabling on-demand service for ranking android
// home modules.
BASE_DECLARE_FEATURE(kSegmentationPlatformAndroidHomeModuleRankerV2);
// Feature flag for controlling sampling of training data collection.
BASE_DECLARE_FEATURE(kSegmentationPlatformTimeDelaySampling);
// Feature flag for enabling data collection for tab ranking.
BASE_DECLARE_FEATURE(kSegmentationPlatformCollectTabRankData);
// Feature flag for intoroducing delay while initializing models at startup.
BASE_DECLARE_FEATURE(kSegmentationPlatformModelInitializationDelay);
// Feature flag for turning of signal database cache.
BASE_DECLARE_FEATURE(kSegmentationPlatformSignalDbCache);
// Feature flag for Compose promotion targeting.
BASE_DECLARE_FEATURE(kSegmentationPlatformComposePromotion);
// Feature flag for using SQL database for UMA signals.
BASE_DECLARE_FEATURE(kSegmentationPlatformUmaFromSqlDb);
// Feature flag for having separate models for the Start and NTP surface.
BASE_DECLARE_FEATURE(kSegmentationPlatformIosModuleRankerSplitBySurface);
// Feature flag for enabling the URL visit resumption ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformURLVisitResumptionRanker);
// Feature flag for enabling the URL visit resumption ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformEphemeralBottomRank);
extern const char kEphemeralCardRankerForceShowCardParam[];
extern const char kEphemeralCardRankerForceHideCardParam[];
// Feature flag for enabling the Ephemeral Card ranker.
BASE_DECLARE_FEATURE(kSegmentationPlatformEphemeralCardRanker);
// Feature flag for enabling the Tips Ephemeral Card.
BASE_DECLARE_FEATURE(kSegmentationPlatformTipsEphemeralCard);
// Defines the sequence of tips variations for the experimental train. The
// sequence uses the underlying variation labels defined in
// `home_modules/constants`.
extern const char kTipsEphemeralCardExperimentTrainParam[];
// Returns the enabled experimental train for the Tips Ephemeral Card
// experiment, as a comma-separated string of variation labels. The order of the
// labels in the string determines the order in which the corresponding Tips
// Ephemeral Card variations will be considered for display.
std::string TipsExperimentTrainEnabled();
// Defines the maximum number of times an ephemeral tips card can be visible
// to the user.
extern const char kTipsEphemeralCardModuleMaxImpressionCount[];
// Returns the maximum number of times an ephemeral tips card can be visible
// to the user.
int GetTipsEphemeralCardModuleMaxImpressionCount();
BASE_DECLARE_FEATURE(kSegmentationSurveyPage);
extern const base::FeatureParam<bool> kSegmentationSurveyInternalsPage;
// Feature flag for enabling the Educational tip module in the home modules on
// chrome android.
BASE_DECLARE_FEATURE(kEducationalTipModule);
// The maximum number of times the default browser promo card can be visible to
// the user.
extern const base::FeatureParam<int> kMaxDefaultBrowserCardImpressions;
// The maximum number of times the tab group promo card can be visible to the
// user.
extern const base::FeatureParam<int> kMaxTabGroupCardImpressions;
// The maximum number of times the tab group sync promo card can be visible to
// the user.
extern const base::FeatureParam<int> kMaxTabGroupSyncCardImpressions;
// The maximum number of times the quick delete promo card can be visible to the
// user.
extern const base::FeatureParam<int> kMaxQuickDeleteCardImpressions;
// The maximum number of times the history sync promo card can be visible to the
// user.
extern const base::FeatureParam<int> kMaxHistorySyncCardImpressions;
// The following 3 parameters only affect cards in Android:
// This parameter controls the display frequency limit for the general
// educational tip card on Android. It can be shown at most once within the
// number of days specified by this parameter.
extern const base::FeatureParam<int> KDaysToShowEphemeralCardOnce;
// This parameter defines the display frequency limit for each educational tip
// card on Android. Each card can be shown at most once within the number of
// days specified by this parameter.
extern const base::FeatureParam<int> KDaysToShowEachEphemeralCardOnce;
// This parameter controls which educational tip cards are displayed. If one or
// more card names are provided in this parameter (i.e., the parameter is not an
// empty string), only the cards listed will be displayed; all other educational
// tip cards will be disabled. The parameter is expected to be a comma-separated
// string (e.g., "TabGroupPromo,TabGroupSyncPromo,QuickDeletePromo").
extern const base::FeatureParam<std::string> KNamesOfEphemeralCardsToShow;
// The maximum number of times the auxiliary search promo card can be visible to
// the user.
BASE_DECLARE_FEATURE(kAndroidAppIntegrationModule);
extern const base::FeatureParam<bool> kMaxAuxiliarySearchForceShow;
extern const base::FeatureParam<int> kMaxAuxiliarySearchCardImpressions;
// Feature flag for enabling FedCM user segment.
BASE_DECLARE_FEATURE(kSegmentationPlatformFedCmUser);
// Feature flag enabling checking a propensity model before showing a default
// browser promo.
BASE_DECLARE_FEATURE(kDefaultBrowserPromoPropensityModel);
} // namespace segmentation_platform::features
#endif // COMPONENTS_SEGMENTATION_PLATFORM_PUBLIC_FEATURES_H_
|