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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #endif | 91 #endif |
92 | 92 |
93 #if defined(USE_NSS) || defined(OS_IOS) | 93 #if defined(USE_NSS) || defined(OS_IOS) |
94 #include "net/ocsp/nss_ocsp.h" | 94 #include "net/ocsp/nss_ocsp.h" |
95 #endif | 95 #endif |
96 | 96 |
97 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 97 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
98 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 98 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
99 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 99 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
100 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" | 100 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" |
| 101 #include "components/data_reduction_proxy/browser/data_reduction_proxy_delegate.
h" |
101 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" | 102 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" |
102 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 103 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
103 | 104 |
104 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
105 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 106 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
106 #include "chromeos/network/host_resolver_impl_chromeos.h" | 107 #include "chromeos/network/host_resolver_impl_chromeos.h" |
107 #endif | 108 #endif |
108 | 109 |
109 using content::BrowserThread; | 110 using content::BrowserThread; |
110 | 111 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 IsIncludedInHoldbackFieldTrial()) | 647 IsIncludedInHoldbackFieldTrial()) |
647 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 648 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
648 globals_->data_reduction_proxy_params.reset( | 649 globals_->data_reduction_proxy_params.reset( |
649 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); | 650 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); |
650 globals_->data_reduction_proxy_auth_request_handler.reset( | 651 globals_->data_reduction_proxy_auth_request_handler.reset( |
651 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( | 652 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
652 DataReductionProxyChromeSettings::GetClient(), | 653 DataReductionProxyChromeSettings::GetClient(), |
653 chrome::VersionInfo().Version(), | 654 chrome::VersionInfo().Version(), |
654 globals_->data_reduction_proxy_params.get(), | 655 globals_->data_reduction_proxy_params.get(), |
655 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 656 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| 657 globals_->data_reduction_proxy_delegate.reset( |
| 658 new data_reduction_proxy::DataReductionProxyDelegate( |
| 659 globals_->data_reduction_proxy_auth_request_handler.get())); |
656 // This is the same as in ProfileImplIOData except that we do not collect | 660 // This is the same as in ProfileImplIOData except that we do not collect |
657 // usage stats. | 661 // usage stats. |
658 network_delegate->set_data_reduction_proxy_params( | 662 network_delegate->set_data_reduction_proxy_params( |
659 globals_->data_reduction_proxy_params.get()); | 663 globals_->data_reduction_proxy_params.get()); |
660 network_delegate->set_data_reduction_proxy_auth_request_handler( | 664 network_delegate->set_data_reduction_proxy_auth_request_handler( |
661 globals_->data_reduction_proxy_auth_request_handler.get()); | 665 globals_->data_reduction_proxy_auth_request_handler.get()); |
662 network_delegate->set_on_resolve_proxy_handler( | 666 network_delegate->set_on_resolve_proxy_handler( |
663 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); | 667 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
664 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 668 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
665 | 669 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); | 1049 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); |
1046 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); | 1050 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); |
1047 globals.quic_supported_versions.CopyToIfSet( | 1051 globals.quic_supported_versions.CopyToIfSet( |
1048 ¶ms->quic_supported_versions); | 1052 ¶ms->quic_supported_versions); |
1049 params->quic_connection_options = globals.quic_connection_options; | 1053 params->quic_connection_options = globals.quic_connection_options; |
1050 | 1054 |
1051 globals.origin_to_force_quic_on.CopyToIfSet( | 1055 globals.origin_to_force_quic_on.CopyToIfSet( |
1052 ¶ms->origin_to_force_quic_on); | 1056 ¶ms->origin_to_force_quic_on); |
1053 params->enable_user_alternate_protocol_ports = | 1057 params->enable_user_alternate_protocol_ports = |
1054 globals.enable_user_alternate_protocol_ports; | 1058 globals.enable_user_alternate_protocol_ports; |
| 1059 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
| 1060 params->proxy_delegate = globals.data_reduction_proxy_delegate.get(); |
| 1061 #endif |
1055 } | 1062 } |
1056 | 1063 |
1057 base::TimeTicks IOThread::creation_time() const { | 1064 base::TimeTicks IOThread::creation_time() const { |
1058 return creation_time_; | 1065 return creation_time_; |
1059 } | 1066 } |
1060 | 1067 |
1061 net::SSLConfigService* IOThread::GetSSLConfigService() { | 1068 net::SSLConfigService* IOThread::GetSSLConfigService() { |
1062 return ssl_config_service_manager_->Get(); | 1069 return ssl_config_service_manager_->Get(); |
1063 } | 1070 } |
1064 | 1071 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1414 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1408 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1415 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1409 net::QuicVersion version = supported_versions[i]; | 1416 net::QuicVersion version = supported_versions[i]; |
1410 if (net::QuicVersionToString(version) == quic_version) { | 1417 if (net::QuicVersionToString(version) == quic_version) { |
1411 return version; | 1418 return version; |
1412 } | 1419 } |
1413 } | 1420 } |
1414 | 1421 |
1415 return net::QUIC_VERSION_UNSUPPORTED; | 1422 return net::QUIC_VERSION_UNSUPPORTED; |
1416 } | 1423 } |
OLD | NEW |