|
@@ -0,0 +1,69 @@
|
|
|
+--- a/chrome/browser/federated_learning/floc_id_provider_factory.cc
|
|
|
++++ b/chrome/browser/federated_learning/floc_id_provider_factory.cc
|
|
|
+@@ -48,39 +48,7 @@ FlocIdProviderFactory::~FlocIdProviderFa
|
|
|
+
|
|
|
+ KeyedService* FlocIdProviderFactory::BuildServiceInstanceFor(
|
|
|
+ content::BrowserContext* context) const {
|
|
|
+- Profile* profile = Profile::FromBrowserContext(context);
|
|
|
+-
|
|
|
+- syncer::SyncService* sync_service =
|
|
|
+- ProfileSyncServiceFactory::GetForProfile(profile);
|
|
|
+- if (!sync_service)
|
|
|
+- return nullptr;
|
|
|
+-
|
|
|
+- PrivacySandboxSettings* privacy_sandbox_settings =
|
|
|
+- PrivacySandboxSettingsFactory::GetForProfile(profile);
|
|
|
+- if (!privacy_sandbox_settings)
|
|
|
+- return nullptr;
|
|
|
+-
|
|
|
+- FlocRemotePermissionService* floc_remote_permission_service =
|
|
|
+- FlocRemotePermissionServiceFactory::GetForProfile(profile);
|
|
|
+- if (!floc_remote_permission_service)
|
|
|
+- return nullptr;
|
|
|
+-
|
|
|
+- history::HistoryService* history_service =
|
|
|
+- HistoryServiceFactory::GetForProfile(profile,
|
|
|
+- ServiceAccessType::IMPLICIT_ACCESS);
|
|
|
+- if (!history_service)
|
|
|
+- return nullptr;
|
|
|
+-
|
|
|
+- syncer::UserEventService* user_event_service =
|
|
|
+- browser_sync::UserEventServiceFactory::GetForProfile(profile);
|
|
|
+- if (!user_event_service)
|
|
|
+- return nullptr;
|
|
|
+-
|
|
|
+- auto floc_event_logger = std::make_unique<FlocEventLogger>(
|
|
|
+- sync_service, floc_remote_permission_service, user_event_service);
|
|
|
+-
|
|
|
+- return new FlocIdProviderImpl(profile->GetPrefs(), privacy_sandbox_settings,
|
|
|
+- history_service, std::move(floc_event_logger));
|
|
|
++ return nullptr;
|
|
|
+ }
|
|
|
+
|
|
|
+ } // namespace federated_learning
|
|
|
+--- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
|
|
|
++++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
|
|
|
+@@ -174,11 +174,7 @@ PrivacySandboxSettings::~PrivacySandboxS
|
|
|
+ bool PrivacySandboxSettings::IsFlocAllowed(
|
|
|
+ const GURL& url,
|
|
|
+ const base::Optional<url::Origin>& top_frame_origin) const {
|
|
|
+- ContentSettingsForOneType cookie_settings;
|
|
|
+- cookie_settings_->GetCookieSettings(&cookie_settings);
|
|
|
+-
|
|
|
+- return IsPrivacySandboxAllowedForContext(url, top_frame_origin,
|
|
|
+- cookie_settings);
|
|
|
++ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ base::Time PrivacySandboxSettings::FlocDataAccessibleSince() const {
|
|
|
+--- a/components/federated_learning/features/features.cc
|
|
|
++++ b/components/federated_learning/features/features.cc
|
|
|
+@@ -28,7 +28,7 @@ const base::Feature kFlocPagesWithAdReso
|
|
|
+ // required.
|
|
|
+ // TODO(yaoxia): merge other floc features into this one.
|
|
|
+ const base::Feature kFederatedLearningOfCohorts{
|
|
|
+- "FederatedLearningOfCohorts", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
|
++ "FederatedLearningOfCohorts", base::FEATURE_DISABLED_BY_DEFAULT};
|
|
|
+ constexpr base::FeatureParam<base::TimeDelta> kFlocIdScheduledUpdateInterval{
|
|
|
+ &kFederatedLearningOfCohorts, "update_interval",
|
|
|
+ base::TimeDelta::FromDays(7)};
|