Break cycle preventing factories from depending on HostContentSettings
Today we have a circular dependency between a handful of factories and
HostContentSettingsMapFactory due to FirstPartySetsPolicyService
observing PrivacySandboxSettings via ProfileNetworkContextService rather
than doing so directly. This CL removes the ProfileNetworkContextService
go-between and makes the observation direct, allowing these factories
to explicitly declare they depend on HCSMF and allowing other impacted
factories (TrackingProtectionSettingsFactory) to do the same
This also requires updating the registration of the CookieControlsMode pref so it happens alongside the other prefs rather than separately
Fixed: b:40250371, b:40275685, b:333895073
Change-Id: I0c7f0e70f9f0c67ae575aa905ba924f6452491aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5464440
Reviewed-by: Chris Fredrickson <[email protected]>
Reviewed-by: Dominic Battre <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Reviewed-by: Christian Dullweber <[email protected]>
Auto-Submit: Fiona Macintosh <[email protected]>
Commit-Queue: Fiona Macintosh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1289925}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 5b82694..f9c4452 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1816,6 +1816,7 @@
ChromeContentBrowserClient::RegisterProfilePrefs(registry);
chrome_labs_prefs::RegisterProfilePrefs(registry);
ChromeLocationBarModelDelegate::RegisterProfilePrefs(registry);
+ content_settings::CookieSettings::RegisterProfilePrefs(registry);
StatefulSSLHostStateDelegate::RegisterProfilePrefs(registry);
ChromeVersionService::RegisterProfilePrefs(registry);
chrome_browser_net::NetErrorTabHelper::RegisterProfilePrefs(registry);