| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "net/cert/multi_log_ct_verifier.h" | 87 #include "net/cert/multi_log_ct_verifier.h" |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 #if defined(USE_NSS) || defined(OS_IOS) | 90 #if defined(USE_NSS) || defined(OS_IOS) |
| 91 #include "net/ocsp/nss_ocsp.h" | 91 #include "net/ocsp/nss_ocsp.h" |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 #if defined(OS_ANDROID) || defined(OS_IOS) | 94 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 95 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" | 95 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ
est_handler.h" |
| 96 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" | 96 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
| 97 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" |
| 97 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" | 98 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" |
| 98 #endif | 99 #endif |
| 99 | 100 |
| 100 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
| 101 #include "chrome/browser/chromeos/login/users/user_manager.h" | 102 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 102 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 103 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 103 #include "chromeos/network/host_resolver_impl_chromeos.h" | 104 #include "chromeos/network/host_resolver_impl_chromeos.h" |
| 104 #endif | 105 #endif |
| 105 | 106 |
| 106 using content::BrowserThread; | 107 using content::BrowserThread; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 drp_flags |= DataReductionProxyParams::kAllowed; | 622 drp_flags |= DataReductionProxyParams::kAllowed; |
| 622 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) | 623 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
| 623 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; | 624 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; |
| 624 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) | 625 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
| 625 drp_flags |= DataReductionProxyParams::kPromoAllowed; | 626 drp_flags |= DataReductionProxyParams::kPromoAllowed; |
| 626 DataReductionProxyParams* proxy_params = | 627 DataReductionProxyParams* proxy_params = |
| 627 new DataReductionProxyParams(drp_flags); | 628 new DataReductionProxyParams(drp_flags); |
| 628 globals_->data_reduction_proxy_params.reset(proxy_params); | 629 globals_->data_reduction_proxy_params.reset(proxy_params); |
| 629 globals_->data_reduction_proxy_auth_request_handler.reset( | 630 globals_->data_reduction_proxy_auth_request_handler.reset( |
| 630 new DataReductionProxyAuthRequestHandler(proxy_params)); | 631 new DataReductionProxyAuthRequestHandler(proxy_params)); |
| 632 globals_->on_resolve_proxy_handler.reset( |
| 633 new ChromeNetworkDelegate::OnResolveProxyHandler( |
| 634 base::Bind(data_reduction_proxy::OnResolveProxyHandler))); |
| 631 DataReductionProxyUsageStats* proxy_usage_stats = | 635 DataReductionProxyUsageStats* proxy_usage_stats = |
| 632 new DataReductionProxyUsageStats(proxy_params, | 636 new DataReductionProxyUsageStats(proxy_params, |
| 633 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 637 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 634 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 638 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 635 network_delegate->set_data_reduction_proxy_params(proxy_params); | 639 network_delegate->set_data_reduction_proxy_params(proxy_params); |
| 636 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); | 640 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); |
| 637 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); | 641 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); |
| 638 network_delegate->set_data_reduction_proxy_auth_request_handler( | 642 network_delegate->set_data_reduction_proxy_auth_request_handler( |
| 639 globals_->data_reduction_proxy_auth_request_handler.get()); | 643 globals_->data_reduction_proxy_auth_request_handler.get()); |
| 644 network_delegate->set_on_resolve_proxy_handler( |
| 645 globals_->on_resolve_proxy_handler.get()); |
| 640 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 646 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
| 641 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 647 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 642 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( | 648 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
| 643 globals_->host_resolver.get())); | 649 globals_->host_resolver.get())); |
| 644 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); | 650 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |
| 645 // For the ProxyScriptFetcher, we use a direct ProxyService. | 651 // For the ProxyScriptFetcher, we use a direct ProxyService. |
| 646 globals_->proxy_script_fetcher_proxy_service.reset( | 652 globals_->proxy_script_fetcher_proxy_service.reset( |
| 647 net::ProxyService::CreateDirectWithNetLog(net_log_)); | 653 net::ProxyService::CreateDirectWithNetLog(net_log_)); |
| 648 // In-memory cookie store. | 654 // In-memory cookie store. |
| 649 globals_->system_cookie_store = | 655 globals_->system_cookie_store = |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1302 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1297 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1303 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1298 net::QuicVersion version = supported_versions[i]; | 1304 net::QuicVersion version = supported_versions[i]; |
| 1299 if (net::QuicVersionToString(version) == quic_version) { | 1305 if (net::QuicVersionToString(version) == quic_version) { |
| 1300 return version; | 1306 return version; |
| 1301 } | 1307 } |
| 1302 } | 1308 } |
| 1303 | 1309 |
| 1304 return net::QUIC_VERSION_UNSUPPORTED; | 1310 return net::QUIC_VERSION_UNSUPPORTED; |
| 1305 } | 1311 } |
| OLD | NEW |