mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Remove the evil URLRequestContextGetter::network_delegate
This commit is contained in:
@@ -441,14 +441,15 @@ void DownloadIdCallback(content::DownloadManager* download_manager,
|
||||
}
|
||||
|
||||
void SetDevToolsNetworkEmulationClientIdInIO(
|
||||
brightray::URLRequestContextGetter* context_getter,
|
||||
brightray::URLRequestContextGetter* url_request_context_getter,
|
||||
const std::string& client_id) {
|
||||
if (!context_getter)
|
||||
if (!url_request_context_getter)
|
||||
return;
|
||||
auto network_delegate =
|
||||
static_cast<AtomNetworkDelegate*>(context_getter->network_delegate());
|
||||
if (network_delegate)
|
||||
network_delegate->SetDevToolsNetworkEmulationClientId(client_id);
|
||||
net::URLRequestContext* context =
|
||||
url_request_context_getter->GetURLRequestContext();
|
||||
AtomNetworkDelegate* network_delegate =
|
||||
static_cast<AtomNetworkDelegate*>(context->network_delegate());
|
||||
network_delegate->SetDevToolsNetworkEmulationClientId(client_id);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user