diff options
Diffstat (limited to 'www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch')
| -rw-r--r-- | www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch new file mode 100644 index 0000000..3ef84c2 --- /dev/null +++ b/www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | --- chrome/browser/federated_learning/floc_id_provider_factory.cc.orig | ||
| 2 | +++ chrome/browser/federated_learning/floc_id_provider_factory.cc | ||
| 3 | @@ -49,42 +49,7 @@ FlocIdProviderFactory::~FlocIdProviderFa | ||
| 4 | |||
| 5 | KeyedService* FlocIdProviderFactory::BuildServiceInstanceFor( | ||
| 6 | content::BrowserContext* context) const { | ||
| 7 | - if (!base::FeatureList::IsEnabled(kFederatedLearningOfCohorts)) | ||
| 8 | - return nullptr; | ||
| 9 | - | ||
| 10 | - Profile* profile = Profile::FromBrowserContext(context); | ||
| 11 | - | ||
| 12 | - syncer::SyncService* sync_service = | ||
| 13 | - SyncServiceFactory::GetForProfile(profile); | ||
| 14 | - if (!sync_service) | ||
| 15 | - return nullptr; | ||
| 16 | - | ||
| 17 | - PrivacySandboxSettings* privacy_sandbox_settings = | ||
| 18 | - PrivacySandboxSettingsFactory::GetForProfile(profile); | ||
| 19 | - if (!privacy_sandbox_settings) | ||
| 20 | - return nullptr; | ||
| 21 | - | ||
| 22 | - FlocRemotePermissionService* floc_remote_permission_service = | ||
| 23 | - FlocRemotePermissionServiceFactory::GetForProfile(profile); | ||
| 24 | - if (!floc_remote_permission_service) | ||
| 25 | - return nullptr; | ||
| 26 | - | ||
| 27 | - history::HistoryService* history_service = | ||
| 28 | - HistoryServiceFactory::GetForProfile(profile, | ||
| 29 | - ServiceAccessType::IMPLICIT_ACCESS); | ||
| 30 | - if (!history_service) | ||
| 31 | - return nullptr; | ||
| 32 | - | ||
| 33 | - syncer::UserEventService* user_event_service = | ||
| 34 | - browser_sync::UserEventServiceFactory::GetForProfile(profile); | ||
| 35 | - if (!user_event_service) | ||
| 36 | - return nullptr; | ||
| 37 | - | ||
| 38 | - auto floc_event_logger = std::make_unique<FlocEventLogger>( | ||
| 39 | - sync_service, floc_remote_permission_service, user_event_service); | ||
| 40 | - | ||
| 41 | - return new FlocIdProviderImpl(profile->GetPrefs(), privacy_sandbox_settings, | ||
| 42 | - history_service, std::move(floc_event_logger)); | ||
| 43 | + return nullptr; | ||
| 44 | } | ||
| 45 | |||
| 46 | } // namespace federated_learning | ||
| 47 | --- chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc.orig | ||
| 48 | +++ chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc | ||
| 49 | @@ -132,8 +132,7 @@ bool ShouldDisablePrivacySandbox( | ||
| 50 | |||
| 51 | // Returns whether FLoC is allowable by the current state of |pref_service|. | ||
| 52 | bool IsFlocAllowedByPrefs(PrefService* pref_service) { | ||
| 53 | - return pref_service->GetBoolean(prefs::kPrivacySandboxFlocEnabled) && | ||
| 54 | - pref_service->GetBoolean(prefs::kPrivacySandboxApisEnabled); | ||
| 55 | + return false; | ||
| 56 | } | ||
| 57 | |||
| 58 | // Returns the number of days in |time|, rounded to the closest day by hour if | ||
| 59 | @@ -207,7 +206,7 @@ PrivacySandboxSettings::PrivacySandboxSe | ||
| 60 | PrivacySandboxSettings::~PrivacySandboxSettings() = default; | ||
| 61 | |||
| 62 | bool PrivacySandboxSettings::IsFlocAllowed() const { | ||
| 63 | - return IsFlocAllowedByPrefs(pref_service_); | ||
| 64 | + return false; | ||
| 65 | } | ||
| 66 | |||
| 67 | bool PrivacySandboxSettings::IsFlocAllowedForContext( | ||
| 68 | --- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig | ||
| 69 | +++ components/privacy_sandbox/privacy_sandbox_prefs.cc | ||
| 70 | @@ -42,7 +42,7 @@ void RegisterProfilePrefs(PrefRegistrySi | ||
| 71 | registry->RegisterTimePref(prefs::kPrivacySandboxFlocDataAccessibleSince, | ||
| 72 | base::Time()); | ||
| 73 | registry->RegisterBooleanPref( | ||
| 74 | - prefs::kPrivacySandboxFlocEnabled, true, | ||
| 75 | + prefs::kPrivacySandboxFlocEnabled, false, | ||
| 76 | user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | ||
| 77 | } | ||
| 78 | |||
