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