mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: cache URLLoaderFactory per-session (#19998)
* cache the URLLoaderFactory in AtomBrowserContext * use cached loader factory in AtomURLLoaderFactory
This commit is contained in:
@@ -396,12 +396,9 @@ void AtomURLLoaderFactory::StartLoadingHttp(
|
||||
}
|
||||
}
|
||||
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
|
||||
content::BrowserContext::GetDefaultStoragePartition(browser_context.get())
|
||||
->GetURLLoaderFactoryForBrowserProcess();
|
||||
new URLPipeLoader(
|
||||
url_loader_factory, std::move(request), std::move(loader),
|
||||
std::move(client),
|
||||
browser_context->GetURLLoaderFactory(), std::move(request),
|
||||
std::move(loader), std::move(client),
|
||||
static_cast<net::NetworkTrafficAnnotationTag>(traffic_annotation),
|
||||
std::move(upload_data));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user