| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 drp_flags |= DataReductionProxyParams::kAllowed; | 632 drp_flags |= DataReductionProxyParams::kAllowed; |
| 632 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) | 633 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
| 633 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; | 634 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; |
| 634 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) | 635 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
| 635 drp_flags |= DataReductionProxyParams::kPromoAllowed; | 636 drp_flags |= DataReductionProxyParams::kPromoAllowed; |
| 636 DataReductionProxyParams* proxy_params = | 637 DataReductionProxyParams* proxy_params = |
| 637 new DataReductionProxyParams(drp_flags); | 638 new DataReductionProxyParams(drp_flags); |
| 638 globals_->data_reduction_proxy_params.reset(proxy_params); | 639 globals_->data_reduction_proxy_params.reset(proxy_params); |
| 639 globals_->data_reduction_proxy_auth_request_handler.reset( | 640 globals_->data_reduction_proxy_auth_request_handler.reset( |
| 640 new DataReductionProxyAuthRequestHandler(proxy_params)); | 641 new DataReductionProxyAuthRequestHandler(proxy_params)); |
| 642 globals_->on_resolve_proxy_handler = |
| 643 ChromeNetworkDelegate::OnResolveProxyHandler( |
| 644 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
| 641 DataReductionProxyUsageStats* proxy_usage_stats = | 645 DataReductionProxyUsageStats* proxy_usage_stats = |
| 642 new DataReductionProxyUsageStats(proxy_params, | 646 new DataReductionProxyUsageStats(proxy_params, |
| 643 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 647 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 644 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 648 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 645 network_delegate->set_data_reduction_proxy_params(proxy_params); | 649 network_delegate->set_data_reduction_proxy_params(proxy_params); |
| 646 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); | 650 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); |
| 647 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); | 651 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); |
| 648 network_delegate->set_data_reduction_proxy_auth_request_handler( | 652 network_delegate->set_data_reduction_proxy_auth_request_handler( |
| 649 globals_->data_reduction_proxy_auth_request_handler.get()); | 653 globals_->data_reduction_proxy_auth_request_handler.get()); |
| 654 network_delegate->set_on_resolve_proxy_handler( |
| 655 globals_->on_resolve_proxy_handler); |
| 650 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 656 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
| 651 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 657 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 652 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( | 658 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
| 653 globals_->host_resolver.get())); | 659 globals_->host_resolver.get())); |
| 654 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); | 660 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |
| 655 // For the ProxyScriptFetcher, we use a direct ProxyService. | 661 // For the ProxyScriptFetcher, we use a direct ProxyService. |
| 656 globals_->proxy_script_fetcher_proxy_service.reset( | 662 globals_->proxy_script_fetcher_proxy_service.reset( |
| 657 net::ProxyService::CreateDirectWithNetLog(net_log_)); | 663 net::ProxyService::CreateDirectWithNetLog(net_log_)); |
| 658 // In-memory cookie store. | 664 // In-memory cookie store. |
| 659 globals_->system_cookie_store = | 665 globals_->system_cookie_store = |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1331 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1326 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1332 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1327 net::QuicVersion version = supported_versions[i]; | 1333 net::QuicVersion version = supported_versions[i]; |
| 1328 if (net::QuicVersionToString(version) == quic_version) { | 1334 if (net::QuicVersionToString(version) == quic_version) { |
| 1329 return version; | 1335 return version; |
| 1330 } | 1336 } |
| 1331 } | 1337 } |
| 1332 | 1338 |
| 1333 return net::QUIC_VERSION_UNSUPPORTED; | 1339 return net::QUIC_VERSION_UNSUPPORTED; |
| 1334 } | 1340 } |
| OLD | NEW |