Add a new boolean pref for use in First-Party Sets enterprise policy.
Update SystemNetworkContextManager to contain a IsFirstPartySetsEnabled
method denoting whether First-Party Sets is enabled.
The IsFirstPartySetsEnabled method checks both the kFirstPartySets
Feature Flag and the kFirstPartySetsEnabled Enterprise Policy pref.
Refactored FirstPartySets to maintain this state of being `enabled`, and
this state is set synchronously during NetworkService::Initialize.
Updated net::cookie_util::IsFirstPartySetsEnabled() references in the
browser process to use the check from SystemNetworkContextManager.
Also updated ChromeContentBrowserClient to override ContentBrowserClient
IsFirstPartySetsEnabled to replace cookie_util::IsFirstPartySetsEnabled
references in the content module (replacing will occur in future CL).
Bug: 1244990, 1277126
Change-Id: I416762ebfb15adc1e8ed285086c0f28bb88bf5bb
Related-To: Id3e0792adb1fb9553239139655845027f52afa77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3242818
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Chris Fredrickson <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Commit-Queue: Kirubel Aklilu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#952201}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 7cde01a..e6d8b31 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/enterprise/reporting/prefs.h"
#include "chrome/browser/enterprise/util/managed_browser_utils.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
+#include "chrome/browser/first_party_sets/first_party_sets_pref_names.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/gpu/gpu_mode_manager.h"
#include "chrome/browser/lifetime/browser_shutdown.h"
@@ -932,6 +933,7 @@
enterprise_reporting::RegisterLocalStatePrefs(registry);
ExternalProtocolHandler::RegisterPrefs(registry);
flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
+ first_party_sets::RegisterLocalStatePrefs(registry);
GpuModeManager::RegisterPrefs(registry);
signin::IdentityManager::RegisterLocalStatePrefs(registry);
invalidation::FCMInvalidationService::RegisterPrefs(registry);