| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/cronet/ios/cronet_environment.h" | 5 #include "components/cronet/ios/cronet_environment.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 new net::HttpCache(http_network_session, std::move(main_backend), | 333 new net::HttpCache(http_network_session, std::move(main_backend), |
| 334 true /* set_up_quic_server_info */); | 334 true /* set_up_quic_server_info */); |
| 335 main_context_->set_http_transaction_factory(main_cache); | 335 main_context_->set_http_transaction_factory(main_cache); |
| 336 | 336 |
| 337 net::URLRequestJobFactoryImpl* job_factory = | 337 net::URLRequestJobFactoryImpl* job_factory = |
| 338 new net::URLRequestJobFactoryImpl; | 338 new net::URLRequestJobFactoryImpl; |
| 339 main_context_->set_job_factory(job_factory); | 339 main_context_->set_job_factory(job_factory); |
| 340 main_context_->set_net_log(net_log_.get()); | 340 main_context_->set_net_log(net_log_.get()); |
| 341 } | 341 } |
| 342 | 342 |
| 343 std::string CronetEnvironment::user_agent() { | 343 std::string CronetEnvironment::UserAgent() { |
| 344 const net::HttpUserAgentSettings* user_agent_settings = | 344 const net::HttpUserAgentSettings* user_agent_settings = |
| 345 main_context_->http_user_agent_settings(); | 345 main_context_->http_user_agent_settings(); |
| 346 if (!user_agent_settings) { | 346 if (!user_agent_settings) { |
| 347 return nullptr; | 347 return nullptr; |
| 348 } | 348 } |
| 349 | 349 |
| 350 return user_agent_settings->GetUserAgent(); | 350 return user_agent_settings->GetUserAgent(); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace cronet | 353 } // namespace cronet |
| OLD | NEW |