Commit 37d73d3a authored by Yao Xiao's avatar Yao Xiao Committed by Chromium LUCI CQ

[floc] Default minimum history domain size to 3

Bug: 1156543
Change-Id: Ie148e7f191d4148c697059ce3bdfd430c84b1411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578478Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837287}
parent a7c05dc0
......@@ -151,8 +151,9 @@ class FlocIdProviderWithCustomizedServicesBrowserTest
: public FlocIdProviderBrowserTest {
public:
FlocIdProviderWithCustomizedServicesBrowserTest() {
scoped_feature_list_.InitWithFeatures(
{features::kFlocIdComputedEventLogging}, {});
scoped_feature_list_.InitAndEnableFeatureWithParameters(
features::kFederatedLearningOfCohorts,
{{"minimum_history_domain_size_required", "1"}});
}
void SetUpCommandLine(base::CommandLine* command_line) override {
......@@ -681,9 +682,10 @@ class FlocIdProviderSortingLshEnabledBrowserTest
public:
FlocIdProviderSortingLshEnabledBrowserTest() {
scoped_feature_list_.Reset();
scoped_feature_list_.InitWithFeatures(
{features::kFlocIdComputedEventLogging,
features::kFlocIdSortingLshBasedComputation},
scoped_feature_list_.InitWithFeaturesAndParameters(
{{features::kFederatedLearningOfCohorts,
{{"minimum_history_domain_size_required", "1"}}},
{features::kFlocIdSortingLshBasedComputation, {}}},
{});
}
};
......
......@@ -26,7 +26,6 @@ namespace federated_learning {
namespace {
constexpr size_t kMinHistoryDomainSizeToReportFlocId = 1;
constexpr int kQueryHistoryWindowInDays = 7;
// The placeholder sorting-lsh version when the sorting-lsh feature is disabled.
......@@ -341,7 +340,9 @@ void FlocIdProviderImpl::OnGetRecentlyVisitedURLsCompleted(
net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES));
}
if (domains.size() < kMinHistoryDomainSizeToReportFlocId) {
if (domains.size() <
static_cast<size_t>(
features::kFlocIdMinimumHistoryDomainSizeRequired.Get())) {
std::move(callback).Run(ComputeFlocResult());
return;
}
......
......@@ -414,12 +414,17 @@ const base::Feature kFlocIdComputedEventLogging{
const base::Feature kFlocIdSortingLshBasedComputation{
"FlocIdSortingLshBasedComputation", base::FEATURE_DISABLED_BY_DEFAULT};
// Controls whether the floc id will be updated regularly and the rate at which
// they should be updated.
const base::Feature kFlocIdScheduledUpdate{"FlocIdScheduledUpdate",
base::FEATURE_ENABLED_BY_DEFAULT};
// The main floc feature for all the subsidiary control and setting params. It's
// controlling the floc update rate, and the minimum history domain size
// required.
// TODO(yaoxia): merge other floc features into this one.
const base::Feature kFederatedLearningOfCohorts{
"FederatedLearningOfCohorts", base::FEATURE_ENABLED_BY_DEFAULT};
constexpr base::FeatureParam<base::TimeDelta> kFlocIdScheduledUpdateInterval{
&kFlocIdScheduledUpdate, "update_interval", base::TimeDelta::FromDays(7)};
&kFederatedLearningOfCohorts, "update_interval",
base::TimeDelta::FromDays(7)};
constexpr base::FeatureParam<int> kFlocIdMinimumHistoryDomainSizeRequired{
&kFederatedLearningOfCohorts, "minimum_history_domain_size_required", 3};
// Enables Focus Mode which brings up a PWA-like window look.
const base::Feature kFocusMode{"FocusMode", base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -281,9 +281,11 @@ COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kFlocIdSortingLshBasedComputation;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kFlocIdScheduledUpdate;
extern const base::Feature kFederatedLearningOfCohorts;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::FeatureParam<base::TimeDelta> kFlocIdScheduledUpdateInterval;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::FeatureParam<int> kFlocIdMinimumHistoryDomainSizeRequired;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kFocusMode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment