Fix network delegate race condition (#12044)

* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
This commit is contained in:
Cheng Zhao 2018-02-26 23:24:00 +09:00 committed by shelley vohr
parent fdd66bd76d
commit 53229e3d6c
5 changed files with 41 additions and 26 deletions

View file

@ -62,11 +62,11 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
~AtomNetworkDelegate() override;
void SetSimpleListenerInIO(SimpleEvent type,
const URLPatterns& patterns,
const SimpleListener& callback);
URLPatterns patterns,
SimpleListener callback);
void SetResponseListenerInIO(ResponseEvent type,
const URLPatterns& patterns,
const ResponseListener& callback);
URLPatterns patterns,
ResponseListener callback);
void SetDevToolsNetworkEmulationClientId(const std::string& client_id);