| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 config->ConfigureURLRequestContextBuilder(&context_builder, net_log_.get(), | 305 config->ConfigureURLRequestContextBuilder(&context_builder, net_log_.get(), |
| 306 file_thread_.get()->task_runner()); | 306 file_thread_.get()->task_runner()); |
| 307 | 307 |
| 308 std::unique_ptr<net::MappedHostResolver> mapped_host_resolver( | 308 std::unique_ptr<net::MappedHostResolver> mapped_host_resolver( |
| 309 new net::MappedHostResolver( | 309 new net::MappedHostResolver( |
| 310 net::HostResolver::CreateDefaultResolver(nullptr))); | 310 net::HostResolver::CreateDefaultResolver(nullptr))); |
| 311 | 311 |
| 312 context_builder.set_host_resolver(std::move(mapped_host_resolver)); | 312 context_builder.set_host_resolver(std::move(mapped_host_resolver)); |
| 313 | 313 |
| 314 std::unique_ptr<net::CookieStore> cookie_store = | 314 std::unique_ptr<net::CookieStore> cookie_store = |
| 315 base::MakeUnique<CookieStoreIOS>( | 315 base::MakeUnique<net::CookieStoreIOS>( |
| 316 [NSHTTPCookieStorage sharedHTTPCookieStorage]); | 316 [NSHTTPCookieStorage sharedHTTPCookieStorage]); |
| 317 context_builder.SetCookieAndChannelIdStores(std::move(cookie_store), nullptr); | 317 context_builder.SetCookieAndChannelIdStores(std::move(cookie_store), nullptr); |
| 318 | 318 |
| 319 std::unordered_set<std::string> quic_host_whitelist; | 319 std::unordered_set<std::string> quic_host_whitelist; |
| 320 std::unique_ptr<net::HttpServerProperties> http_server_properties( | 320 std::unique_ptr<net::HttpServerProperties> http_server_properties( |
| 321 new net::HttpServerPropertiesImpl()); | 321 new net::HttpServerPropertiesImpl()); |
| 322 for (const auto& quic_hint : quic_hints_) { | 322 for (const auto& quic_hint : quic_hints_) { |
| 323 net::AlternativeService alternative_service(net::kProtoQUIC, "", | 323 net::AlternativeService alternative_service(net::kProtoQUIC, "", |
| 324 quic_hint.port()); | 324 quic_hint.port()); |
| 325 url::SchemeHostPort quic_hint_server("https", quic_hint.host(), | 325 url::SchemeHostPort quic_hint_server("https", quic_hint.host(), |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 event->Signal(); | 371 event->Signal(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 std::string CronetEnvironment::getDefaultQuicUserAgentId() const { | 374 std::string CronetEnvironment::getDefaultQuicUserAgentId() const { |
| 375 return base::SysNSStringToUTF8([[NSBundle mainBundle] | 375 return base::SysNSStringToUTF8([[NSBundle mainBundle] |
| 376 objectForInfoDictionaryKey:@"CFBundleDisplayName"]) + | 376 objectForInfoDictionaryKey:@"CFBundleDisplayName"]) + |
| 377 " Cronet/" + CRONET_VERSION; | 377 " Cronet/" + CRONET_VERSION; |
| 378 } | 378 } |
| 379 | 379 |
| 380 } // namespace cronet | 380 } // namespace cronet |
| OLD | NEW |