OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/crnet/crnet_environment.h" | 5 #include "ios/crnet/crnet_environment.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 params.transport_security_state = main_context_->transport_security_state(); | 402 params.transport_security_state = main_context_->transport_security_state(); |
403 params.proxy_service = main_context_->proxy_service(); | 403 params.proxy_service = main_context_->proxy_service(); |
404 params.ssl_session_cache_shard = ""; | 404 params.ssl_session_cache_shard = ""; |
405 params.ssl_config_service = main_context_->ssl_config_service(); | 405 params.ssl_config_service = main_context_->ssl_config_service(); |
406 params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); | 406 params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); |
407 params.network_delegate = main_context_->network_delegate(); | 407 params.network_delegate = main_context_->network_delegate(); |
408 params.http_server_properties = main_context_->http_server_properties(); | 408 params.http_server_properties = main_context_->http_server_properties(); |
409 params.net_log = main_context_->net_log(); | 409 params.net_log = main_context_->net_log(); |
410 params.next_protos = | 410 params.next_protos = |
411 net::NextProtosWithSpdyAndQuic(spdy_enabled(), quic_enabled()); | 411 net::NextProtosWithSpdyAndQuic(spdy_enabled(), quic_enabled()); |
412 params.use_alternate_protocols = true; | 412 params.use_alternative_services = true; |
413 params.enable_quic = quic_enabled(); | 413 params.enable_quic = quic_enabled(); |
414 params.alternative_service_probability_threshold = | 414 params.alternative_service_probability_threshold = |
415 alternate_protocol_threshold_; | 415 alternate_protocol_threshold_; |
416 | 416 |
417 if (!params.channel_id_service) { | 417 if (!params.channel_id_service) { |
418 // The main context may not have a ChannelIDService, since it is lazily | 418 // The main context may not have a ChannelIDService, since it is lazily |
419 // constructed. If not, build an ephemeral ChannelIDService with no backing | 419 // constructed. If not, build an ephemeral ChannelIDService with no backing |
420 // disk store. | 420 // disk store. |
421 // TODO(ellyjones): support persisting ChannelID. | 421 // TODO(ellyjones): support persisting ChannelID. |
422 params.channel_id_service = new net::ChannelIDService( | 422 params.channel_id_service = new net::ChannelIDService( |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 if (backend) | 472 if (backend) |
473 backend->DoomAllEntries(client_callback); | 473 backend->DoomAllEntries(client_callback); |
474 }); | 474 }); |
475 int rc = cache->GetBackend(&backend, doom_callback); | 475 int rc = cache->GetBackend(&backend, doom_callback); |
476 if (rc != net::ERR_IO_PENDING) { | 476 if (rc != net::ERR_IO_PENDING) { |
477 // GetBackend doesn't call the callback if it completes synchronously, so | 477 // GetBackend doesn't call the callback if it completes synchronously, so |
478 // call it directly here. | 478 // call it directly here. |
479 doom_callback.Run(rc); | 479 doom_callback.Run(rc); |
480 } | 480 } |
481 } | 481 } |
OLD | NEW |