| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "base/time/time.h" | 27 #include "base/time/time.h" |
| 28 #include "build/build_config.h" | 28 #include "build/build_config.h" |
| 29 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
| 30 #include "chrome/browser/extensions/event_router_forwarder.h" | 30 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 31 #include "chrome/browser/net/async_dns_field_trial.h" | 31 #include "chrome/browser/net/async_dns_field_trial.h" |
| 32 #include "chrome/browser/net/chrome_net_log.h" | 32 #include "chrome/browser/net/chrome_net_log.h" |
| 33 #include "chrome/browser/net/chrome_network_delegate.h" | 33 #include "chrome/browser/net/chrome_network_delegate.h" |
| 34 #include "chrome/browser/net/chrome_url_request_context.h" | 34 #include "chrome/browser/net/chrome_url_request_context.h" |
| 35 #include "chrome/browser/net/connect_interceptor.h" | 35 #include "chrome/browser/net/connect_interceptor.h" |
| 36 #include "chrome/browser/net/dns_probe_service.h" | 36 #include "chrome/browser/net/dns_probe_service.h" |
| 37 #include "chrome/browser/net/http_pipelining_compatibility_client.h" | |
| 38 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 37 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 39 #include "chrome/browser/net/proxy_service_factory.h" | 38 #include "chrome/browser/net/proxy_service_factory.h" |
| 40 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 39 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
| 41 #include "chrome/common/chrome_content_client.h" | 40 #include "chrome/common/chrome_content_client.h" |
| 42 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 43 #include "chrome/common/chrome_version_info.h" | 42 #include "chrome/common/chrome_version_info.h" |
| 44 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
| 45 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
| 46 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" | 45 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" |
| 47 #include "components/data_reduction_proxy/browser/http_auth_handler_data_reducti
on_proxy.h" | 46 #include "components/data_reduction_proxy/browser/http_auth_handler_data_reducti
on_proxy.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 387 |
| 389 IOThread::Globals:: | 388 IOThread::Globals:: |
| 390 SystemRequestContextLeakChecker::~SystemRequestContextLeakChecker() { | 389 SystemRequestContextLeakChecker::~SystemRequestContextLeakChecker() { |
| 391 if (globals_->system_request_context.get()) | 390 if (globals_->system_request_context.get()) |
| 392 globals_->system_request_context->AssertNoURLRequests(); | 391 globals_->system_request_context->AssertNoURLRequests(); |
| 393 } | 392 } |
| 394 | 393 |
| 395 IOThread::Globals::Globals() | 394 IOThread::Globals::Globals() |
| 396 : system_request_context_leak_checker(this), | 395 : system_request_context_leak_checker(this), |
| 397 ignore_certificate_errors(false), | 396 ignore_certificate_errors(false), |
| 398 http_pipelining_enabled(false), | |
| 399 testing_fixed_http_port(0), | 397 testing_fixed_http_port(0), |
| 400 testing_fixed_https_port(0), | 398 testing_fixed_https_port(0), |
| 401 enable_user_alternate_protocol_ports(false) { | 399 enable_user_alternate_protocol_ports(false) { |
| 402 } | 400 } |
| 403 | 401 |
| 404 IOThread::Globals::~Globals() {} | 402 IOThread::Globals::~Globals() {} |
| 405 | 403 |
| 406 // |local_state| is passed in explicitly in order to (1) reduce implicit | 404 // |local_state| is passed in explicitly in order to (1) reduce implicit |
| 407 // dependencies and (2) make IOThread more flexible for testing. | 405 // dependencies and (2) make IOThread more flexible for testing. |
| 408 IOThread::IOThread( | 406 IOThread::IOThread( |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 params->server_bound_cert_service = | 926 params->server_bound_cert_service = |
| 929 globals_->system_server_bound_cert_service.get(); | 927 globals_->system_server_bound_cert_service.get(); |
| 930 params->transport_security_state = globals_->transport_security_state.get(); | 928 params->transport_security_state = globals_->transport_security_state.get(); |
| 931 params->ssl_config_service = globals_->ssl_config_service.get(); | 929 params->ssl_config_service = globals_->ssl_config_service.get(); |
| 932 params->http_auth_handler_factory = globals_->http_auth_handler_factory.get(); | 930 params->http_auth_handler_factory = globals_->http_auth_handler_factory.get(); |
| 933 params->http_server_properties = | 931 params->http_server_properties = |
| 934 globals_->http_server_properties->GetWeakPtr(); | 932 globals_->http_server_properties->GetWeakPtr(); |
| 935 params->network_delegate = globals_->system_network_delegate.get(); | 933 params->network_delegate = globals_->system_network_delegate.get(); |
| 936 params->host_mapping_rules = globals_->host_mapping_rules.get(); | 934 params->host_mapping_rules = globals_->host_mapping_rules.get(); |
| 937 params->ignore_certificate_errors = globals_->ignore_certificate_errors; | 935 params->ignore_certificate_errors = globals_->ignore_certificate_errors; |
| 938 params->http_pipelining_enabled = globals_->http_pipelining_enabled; | |
| 939 params->testing_fixed_http_port = globals_->testing_fixed_http_port; | 936 params->testing_fixed_http_port = globals_->testing_fixed_http_port; |
| 940 params->testing_fixed_https_port = globals_->testing_fixed_https_port; | 937 params->testing_fixed_https_port = globals_->testing_fixed_https_port; |
| 941 | 938 |
| 942 globals_->initial_max_spdy_concurrent_streams.CopyToIfSet( | 939 globals_->initial_max_spdy_concurrent_streams.CopyToIfSet( |
| 943 ¶ms->spdy_initial_max_concurrent_streams); | 940 ¶ms->spdy_initial_max_concurrent_streams); |
| 944 globals_->force_spdy_single_domain.CopyToIfSet( | 941 globals_->force_spdy_single_domain.CopyToIfSet( |
| 945 ¶ms->force_spdy_single_domain); | 942 ¶ms->force_spdy_single_domain); |
| 946 globals_->enable_spdy_compression.CopyToIfSet( | 943 globals_->enable_spdy_compression.CopyToIfSet( |
| 947 ¶ms->enable_spdy_compression); | 944 ¶ms->enable_spdy_compression); |
| 948 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( | 945 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 std::string version_flag = | 1200 std::string version_flag = |
| 1204 command_line.GetSwitchValueASCII(switches::kQuicVersion); | 1201 command_line.GetSwitchValueASCII(switches::kQuicVersion); |
| 1205 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1202 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1206 net::QuicVersion version = supported_versions[i]; | 1203 net::QuicVersion version = supported_versions[i]; |
| 1207 if (net::QuicVersionToString(version) == version_flag) { | 1204 if (net::QuicVersionToString(version) == version_flag) { |
| 1208 return version; | 1205 return version; |
| 1209 } | 1206 } |
| 1210 } | 1207 } |
| 1211 return net::QUIC_VERSION_UNSUPPORTED; | 1208 return net::QUIC_VERSION_UNSUPPORTED; |
| 1212 } | 1209 } |
| OLD | NEW |