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 <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 params.channel_id_service = main_context_->channel_id_service(); | 431 params.channel_id_service = main_context_->channel_id_service(); |
432 params.transport_security_state = main_context_->transport_security_state(); | 432 params.transport_security_state = main_context_->transport_security_state(); |
433 params.proxy_service = main_context_->proxy_service(); | 433 params.proxy_service = main_context_->proxy_service(); |
434 params.ssl_config_service = main_context_->ssl_config_service(); | 434 params.ssl_config_service = main_context_->ssl_config_service(); |
435 params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); | 435 params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); |
436 params.network_delegate = main_context_->network_delegate(); | 436 params.network_delegate = main_context_->network_delegate(); |
437 params.http_server_properties = main_context_->http_server_properties(); | 437 params.http_server_properties = main_context_->http_server_properties(); |
438 params.net_log = main_context_->net_log(); | 438 params.net_log = main_context_->net_log(); |
439 params.next_protos = | 439 params.next_protos = |
440 net::NextProtosWithSpdyAndQuic(spdy_enabled(), quic_enabled()); | 440 net::NextProtosWithSpdyAndQuic(spdy_enabled(), quic_enabled()); |
441 params.use_alternative_services = true; | 441 params.use_alternative_services = false; |
442 params.enable_quic = quic_enabled(); | 442 params.enable_quic = quic_enabled(); |
443 params.alternative_service_probability_threshold = | 443 params.alternative_service_probability_threshold = |
444 alternate_protocol_threshold_; | 444 alternate_protocol_threshold_; |
445 | 445 |
446 if (!params.channel_id_service) { | 446 if (!params.channel_id_service) { |
447 // The main context may not have a ChannelIDService, since it is lazily | 447 // The main context may not have a ChannelIDService, since it is lazily |
448 // constructed. If not, build an ephemeral ChannelIDService with no backing | 448 // constructed. If not, build an ephemeral ChannelIDService with no backing |
449 // disk store. | 449 // disk store. |
450 // TODO(ellyjones): support persisting ChannelID. | 450 // TODO(ellyjones): support persisting ChannelID. |
451 params.channel_id_service = new net::ChannelIDService( | 451 params.channel_id_service = new net::ChannelIDService( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 489 |
490 return user_agent_settings->GetUserAgent(); | 490 return user_agent_settings->GetUserAgent(); |
491 } | 491 } |
492 | 492 |
493 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { | 493 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { |
494 PostToNetworkThread( | 494 PostToNetworkThread( |
495 FROM_HERE, | 495 FROM_HERE, |
496 base::Bind(&net::ClearHttpCache, main_context_getter_, | 496 base::Bind(&net::ClearHttpCache, main_context_getter_, |
497 network_io_thread_->task_runner(), base::BindBlock(callback))); | 497 network_io_thread_->task_runner(), base::BindBlock(callback))); |
498 } | 498 } |
OLD | NEW |