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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #endif | 94 #endif |
95 | 95 |
96 #if defined(USE_NSS) || defined(OS_IOS) | 96 #if defined(USE_NSS) || defined(OS_IOS) |
97 #include "net/ocsp/nss_ocsp.h" | 97 #include "net/ocsp/nss_ocsp.h" |
98 #endif | 98 #endif |
99 | 99 |
100 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 100 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
101 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 101 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
102 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 102 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
103 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" | 103 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" |
| 104 #include "components/data_reduction_proxy/browser/data_reduction_proxy_delegate.
h" |
104 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" | 105 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" |
105 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 106 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
106 | 107 |
107 #if defined(OS_CHROMEOS) | 108 #if defined(OS_CHROMEOS) |
108 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 109 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
109 #include "chromeos/network/host_resolver_impl_chromeos.h" | 110 #include "chromeos/network/host_resolver_impl_chromeos.h" |
110 #endif | 111 #endif |
111 | 112 |
112 using content::BrowserThread; | 113 using content::BrowserThread; |
113 | 114 |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 IsIncludedInHoldbackFieldTrial()) | 657 IsIncludedInHoldbackFieldTrial()) |
657 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 658 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
658 globals_->data_reduction_proxy_params.reset( | 659 globals_->data_reduction_proxy_params.reset( |
659 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); | 660 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); |
660 globals_->data_reduction_proxy_auth_request_handler.reset( | 661 globals_->data_reduction_proxy_auth_request_handler.reset( |
661 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( | 662 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
662 DataReductionProxyChromeSettings::GetClient(), | 663 DataReductionProxyChromeSettings::GetClient(), |
663 DataReductionProxyChromeSettings::GetBuildAndPatchNumber(), | 664 DataReductionProxyChromeSettings::GetBuildAndPatchNumber(), |
664 globals_->data_reduction_proxy_params.get(), | 665 globals_->data_reduction_proxy_params.get(), |
665 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 666 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| 667 globals_->data_reduction_proxy_delegate.reset( |
| 668 new data_reduction_proxy::DataReductionProxyDelegate( |
| 669 globals_->data_reduction_proxy_auth_request_handler.get())); |
666 // This is the same as in ProfileImplIOData except that we do not collect | 670 // This is the same as in ProfileImplIOData except that we do not collect |
667 // usage stats. | 671 // usage stats. |
668 network_delegate->set_data_reduction_proxy_params( | 672 network_delegate->set_data_reduction_proxy_params( |
669 globals_->data_reduction_proxy_params.get()); | 673 globals_->data_reduction_proxy_params.get()); |
670 network_delegate->set_data_reduction_proxy_auth_request_handler( | 674 network_delegate->set_data_reduction_proxy_auth_request_handler( |
671 globals_->data_reduction_proxy_auth_request_handler.get()); | 675 globals_->data_reduction_proxy_auth_request_handler.get()); |
672 network_delegate->set_on_resolve_proxy_handler( | 676 network_delegate->set_on_resolve_proxy_handler( |
673 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); | 677 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
674 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 678 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
675 | 679 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); | 1055 globals.quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length); |
1052 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); | 1056 globals.quic_user_agent_id.CopyToIfSet(¶ms->quic_user_agent_id); |
1053 globals.quic_supported_versions.CopyToIfSet( | 1057 globals.quic_supported_versions.CopyToIfSet( |
1054 ¶ms->quic_supported_versions); | 1058 ¶ms->quic_supported_versions); |
1055 params->quic_connection_options = globals.quic_connection_options; | 1059 params->quic_connection_options = globals.quic_connection_options; |
1056 | 1060 |
1057 globals.origin_to_force_quic_on.CopyToIfSet( | 1061 globals.origin_to_force_quic_on.CopyToIfSet( |
1058 ¶ms->origin_to_force_quic_on); | 1062 ¶ms->origin_to_force_quic_on); |
1059 params->enable_user_alternate_protocol_ports = | 1063 params->enable_user_alternate_protocol_ports = |
1060 globals.enable_user_alternate_protocol_ports; | 1064 globals.enable_user_alternate_protocol_ports; |
| 1065 params->proxy_delegate = globals.data_reduction_proxy_delegate.get(); |
1061 } | 1066 } |
1062 | 1067 |
1063 base::TimeTicks IOThread::creation_time() const { | 1068 base::TimeTicks IOThread::creation_time() const { |
1064 return creation_time_; | 1069 return creation_time_; |
1065 } | 1070 } |
1066 | 1071 |
1067 net::SSLConfigService* IOThread::GetSSLConfigService() { | 1072 net::SSLConfigService* IOThread::GetSSLConfigService() { |
1068 return ssl_config_service_manager_->Get(); | 1073 return ssl_config_service_manager_->Get(); |
1069 } | 1074 } |
1070 | 1075 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1397 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1393 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1398 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1394 net::QuicVersion version = supported_versions[i]; | 1399 net::QuicVersion version = supported_versions[i]; |
1395 if (net::QuicVersionToString(version) == quic_version) { | 1400 if (net::QuicVersionToString(version) == quic_version) { |
1396 return version; | 1401 return version; |
1397 } | 1402 } |
1398 } | 1403 } |
1399 | 1404 |
1400 return net::QUIC_VERSION_UNSUPPORTED; | 1405 return net::QUIC_VERSION_UNSUPPORTED; |
1401 } | 1406 } |
OLD | NEW |