fix: return system shared url loader for content layer
This commit is contained in:
parent
57356036db
commit
7e1168c518
2 changed files with 19 additions and 0 deletions
|
@ -804,6 +804,21 @@ base::FilePath AtomBrowserClient::GetDefaultDownloadDirectory() {
|
|||
return path;
|
||||
}
|
||||
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
AtomBrowserClient::GetSystemSharedURLLoaderFactory() {
|
||||
if (!g_browser_process)
|
||||
return nullptr;
|
||||
return g_browser_process->shared_url_loader_factory();
|
||||
}
|
||||
|
||||
void AtomBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {
|
||||
if (!g_browser_process)
|
||||
return;
|
||||
g_browser_process->system_network_context_manager()->OnNetworkServiceCreated(
|
||||
network_service);
|
||||
}
|
||||
|
||||
std::string AtomBrowserClient::GetApplicationLocale() {
|
||||
if (BrowserThread::CurrentlyOn(BrowserThread::IO))
|
||||
return g_io_thread_application_locale.Get();
|
||||
|
|
|
@ -144,6 +144,10 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
content::BrowserMainParts* CreateBrowserMainParts(
|
||||
const content::MainFunctionParams&) override;
|
||||
base::FilePath GetDefaultDownloadDirectory() override;
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
GetSystemSharedURLLoaderFactory() override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
|
||||
// content::RenderProcessHostObserver:
|
||||
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
|
||||
|
|
Loading…
Reference in a new issue