Files
Marshall Greenblatt 937f5c60fd Fix cookieable_schemes_exclude_defaults not respected for on-disk request contexts
When ConfigureNetworkContextParams is called during disk-backed profile
initialization (via ProfileManager::CreateProfileAsync), the
ChromeBrowserContext::profile_ member hasn't been set yet (the callback
hasn't fired). This causes CefBrowserContext::FromBrowserContext to
return nullptr, falling back to GetGlobalCookieableSchemes() instead of
using the context's own cookieable_schemes settings.

Fix by falling back to CefBrowserContext::FromCachePath when
FromBrowserContext returns nullptr. The cache path mapping is registered
in CefBrowserContext::Initialize() before CreateProfileAsync is called,
so the path-based lookup succeeds during profile initialization.

Add GetCookieManagerHttpOnDiskBlocked test to verify
cookieable_schemes_exclude_defaults is respected for on-disk contexts.
2026-03-24 17:53:26 -04:00
..