Chromium Code Reviews| Index: components/cronet/ios/cronet_environment.cc |
| diff --git a/components/cronet/ios/cronet_environment.cc b/components/cronet/ios/cronet_environment.cc |
| index 0fef4af2e2266ab840e1b76a457f213ba763f5a6..a033691ae20c0dae3fd00fdd9e2572f6cec8a7cc 100644 |
| --- a/components/cronet/ios/cronet_environment.cc |
| +++ b/components/cronet/ios/cronet_environment.cc |
| @@ -96,10 +96,6 @@ class CronetURLRequestContextGetter : public net::URLRequestContextGetter { |
| namespace cronet { |
| -bool CronetEnvironment::IsOnNetworkThread() { |
| - return network_io_thread_->task_runner()->BelongsToCurrentThread(); |
| -} |
| - |
| void CronetEnvironment::PostToNetworkThread( |
| const tracked_objects::Location& from_here, |
| const base::Closure& task) { |
| @@ -400,4 +396,12 @@ std::vector<uint8_t> CronetEnvironment::GetHistogramDeltas() { |
| return data; |
| } |
| +void CronetEnvironment::SetHostResolverRules(const std::string& rules) { |
|
mef
2016/11/07 16:33:26
Just to confirm my understanding, do we need to ch
Garrett Casto
2016/11/07 17:23:11
Yeah. The problem is that we need to specify two t
|
| + host_resolver_rules_ = rules; |
| + if (main_context_) { |
|
mef
2016/11/07 17:26:38
I think this is racy. :(
It is possible that Set
|
| + static_cast<net::MappedHostResolver*>(main_context_->host_resolver()) |
| + ->SetRulesFromString(host_resolver_rules_); |
| + } |
| +} |
| + |
| } // namespace cronet |