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