From 015185ad5aa54721e434ba0cd9296ffa8642c680 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 28 Apr 2022 22:17:19 -0700 Subject: [PATCH] fix: fix FirstPartySetsHandler initialization (#33971) --- shell/browser/net/system_network_context_manager.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index d1f474d59ead..552df5c6b2a1 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -20,6 +20,7 @@ #include "components/os_crypt/os_crypt.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/first_party_sets_handler.h" #include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/network_service_util.h" @@ -288,6 +289,11 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( base::FeatureList::IsEnabled(features::kAsyncDns), default_secure_dns_mode, doh_config, additional_dns_query_types_enabled); + // Initializes first party sets component + // CL: https://chromium-review.googlesource.com/c/chromium/src/+/3449280 + content::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets( + base::File()); + std::string app_name = electron::Browser::Get()->GetName(); #if BUILDFLAG(IS_MAC) KeychainPassword::GetServiceName() = app_name + " Safe Storage";