mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	alloy: Avoid initialization of privacy sandbox and identity manager (fixes issue #3434, fixes issue #3401)
This commit is contained in:
		| @@ -443,6 +443,9 @@ patches = [ | |||||||
|     # - Fix cache directory structure ("C:\temp\cache\cache\Cache" should be |     # - Fix cache directory structure ("C:\temp\cache\cache\Cache" should be | ||||||
|     #   "C:\temp\cache\Cache"). |     #   "C:\temp\cache\Cache"). | ||||||
|     # https://bitbucket.org/chromiumembedded/cef/issues/2622 |     # https://bitbucket.org/chromiumembedded/cef/issues/2622 | ||||||
|  |     # | ||||||
|  |     # alloy: Avoid initialization of privacy sandbox and identity manager. | ||||||
|  |     # https://bitbucket.org/chromiumembedded/cef/issues/3434 | ||||||
|     'name': 'services_network_2622', |     'name': 'services_network_2622', | ||||||
|   }, |   }, | ||||||
|   { |   { | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc | diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc | ||||||
| index eb8daa2c4d5fe..254d6e08bffc4 100644 | index eb8daa2c4d5fe..f3d7f7bcd5c85 100644 | ||||||
| --- chrome/browser/net/profile_network_context_service.cc | --- chrome/browser/net/profile_network_context_service.cc | ||||||
| +++ chrome/browser/net/profile_network_context_service.cc | +++ chrome/browser/net/profile_network_context_service.cc | ||||||
| @@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||||||
| @@ -10,7 +10,20 @@ index eb8daa2c4d5fe..254d6e08bffc4 100644 | |||||||
|  #include "chrome/browser/browser_features.h" |  #include "chrome/browser/browser_features.h" | ||||||
|  #include "chrome/browser/browser_process.h" |  #include "chrome/browser/browser_process.h" | ||||||
|  #include "chrome/browser/chrome_content_browser_client.h" |  #include "chrome/browser/chrome_content_browser_client.h" | ||||||
| @@ -304,7 +305,9 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) | @@ -263,8 +264,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) | ||||||
|  |                            base::Unretained(this))); | ||||||
|  |    cookie_settings_ = CookieSettingsFactory::GetForProfile(profile); | ||||||
|  |    cookie_settings_observation_.Observe(cookie_settings_.get()); | ||||||
|  | -  privacy_sandbox_settings_observer_.Observe( | ||||||
|  | -      PrivacySandboxSettingsFactory::GetForProfile(profile)); | ||||||
|  | +  if (!cef::IsAlloyRuntimeEnabled()) { | ||||||
|  | +    privacy_sandbox_settings_observer_.Observe( | ||||||
|  | +        PrivacySandboxSettingsFactory::GetForProfile(profile)); | ||||||
|  | +  } | ||||||
|  |   | ||||||
|  |    DisableQuicIfNotAllowed(); | ||||||
|  |   | ||||||
|  | @@ -304,7 +307,9 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) | ||||||
|                            base::Unretained(this))); |                            base::Unretained(this))); | ||||||
|   |   | ||||||
|  #if BUILDFLAG(ENABLE_EXTENSIONS) |  #if BUILDFLAG(ENABLE_EXTENSIONS) | ||||||
| @@ -21,7 +34,7 @@ index eb8daa2c4d5fe..254d6e08bffc4 100644 | |||||||
|  #endif |  #endif | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -796,7 +799,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( | @@ -796,7 +801,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( | ||||||
|   |   | ||||||
|    // Configure on-disk storage for non-OTR profiles. OTR profiles just use |    // Configure on-disk storage for non-OTR profiles. OTR profiles just use | ||||||
|    // default behavior (in memory storage, default sizes). |    // default behavior (in memory storage, default sizes). | ||||||
| @@ -42,7 +55,7 @@ index eb8daa2c4d5fe..254d6e08bffc4 100644 | |||||||
|      PrefService* local_state = g_browser_process->local_state(); |      PrefService* local_state = g_browser_process->local_state(); | ||||||
|      // Configure the HTTP cache path and size. |      // Configure the HTTP cache path and size. | ||||||
|      base::FilePath base_cache_path; |      base::FilePath base_cache_path; | ||||||
| @@ -809,7 +824,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( | @@ -809,7 +826,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( | ||||||
|          base_cache_path.Append(chrome::kCacheDirname); |          base_cache_path.Append(chrome::kCacheDirname); | ||||||
|      network_context_params->http_cache_max_size = |      network_context_params->http_cache_max_size = | ||||||
|          local_state->GetInteger(prefs::kDiskCacheSize); |          local_state->GetInteger(prefs::kDiskCacheSize); | ||||||
| @@ -52,6 +65,34 @@ index eb8daa2c4d5fe..254d6e08bffc4 100644 | |||||||
|      network_context_params->file_paths = |      network_context_params->file_paths = | ||||||
|          ::network::mojom::NetworkContextFilePaths::New(); |          ::network::mojom::NetworkContextFilePaths::New(); | ||||||
|   |   | ||||||
|  | @@ -1009,6 +1028,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( | ||||||
|  |    network_context_params->require_network_isolation_key = true; | ||||||
|  |   | ||||||
|  |    network_context_params->block_trust_tokens = | ||||||
|  | +      cef::IsAlloyRuntimeEnabled() || | ||||||
|  |        !PrivacySandboxSettingsFactory::GetForProfile(profile_) | ||||||
|  |             ->IsTrustTokensAllowed(); | ||||||
|  |   | ||||||
|  | diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc | ||||||
|  | index ff1d5b905b050..911e4b13f91e1 100644 | ||||||
|  | --- chrome/browser/signin/identity_manager_factory.cc | ||||||
|  | +++ chrome/browser/signin/identity_manager_factory.cc | ||||||
|  | @@ -11,6 +11,7 @@ | ||||||
|  |  #include "base/observer_list.h" | ||||||
|  |  #include "build/build_config.h" | ||||||
|  |  #include "build/chromeos_buildflags.h" | ||||||
|  | +#include "cef/libcef/features/runtime.h" | ||||||
|  |  #include "chrome/browser/browser_process.h" | ||||||
|  |  #include "chrome/browser/image_fetcher/image_decoder_impl.h" | ||||||
|  |  #include "chrome/browser/profiles/profile.h" | ||||||
|  | @@ -82,6 +83,7 @@ IdentityManagerFactory::~IdentityManagerFactory() { | ||||||
|  |  // static | ||||||
|  |  signin::IdentityManager* IdentityManagerFactory::GetForProfile( | ||||||
|  |      Profile* profile) { | ||||||
|  | +  DCHECK(!cef::IsAlloyRuntimeEnabled()); | ||||||
|  |    return static_cast<signin::IdentityManager*>( | ||||||
|  |        GetInstance()->GetServiceForBrowserContext(profile, true)); | ||||||
|  |  } | ||||||
| diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc | diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc | ||||||
| index 87c6a189d251e..388a02a938468 100644 | index 87c6a189d251e..388a02a938468 100644 | ||||||
| --- net/cookies/cookie_monster.cc | --- net/cookies/cookie_monster.cc | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user