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:
parent
fdd66bd76d
commit
53229e3d6c
5 changed files with 41 additions and 26 deletions
|
@ -84,11 +84,6 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
|
|||
|
||||
net::HostResolver* host_resolver();
|
||||
net::URLRequestJobFactory* job_factory() const { return job_factory_; }
|
||||
net::NetworkDelegate* network_delegate() const {
|
||||
if (url_request_context_)
|
||||
return url_request_context_->network_delegate();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
Delegate* delegate_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue