forked from ungoogled-software/ungoogled-chromium
-
Notifications
You must be signed in to change notification settings - Fork 3
/
disable-floc.patch
69 lines (66 loc) · 2.83 KB
/
disable-floc.patch
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
--- 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)};