| 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 23 matching lines...) Expand all Loading... |
| 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/pref_proxy_config_tracker.h" | 37 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 38 #include "chrome/browser/net/proxy_service_factory.h" | 38 #include "chrome/browser/net/proxy_service_factory.h" |
| 39 #include "chrome/common/chrome_content_client.h" | 39 #include "chrome/common/chrome_content_client.h" |
| 40 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/common/chrome_version_info.h" | 41 #include "chrome/common/chrome_version_info.h" |
| 42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 43 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" | 43 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" |
| 44 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.
h" |
| 44 #include "components/data_reduction_proxy/browser/http_auth_handler_data_reducti
on_proxy.h" | 45 #include "components/data_reduction_proxy/browser/http_auth_handler_data_reducti
on_proxy.h" |
| 45 #include "components/policy/core/common/policy_service.h" | 46 #include "components/policy/core/common/policy_service.h" |
| 46 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 47 #include "content/public/browser/cookie_store_factory.h" | 48 #include "content/public/browser/cookie_store_factory.h" |
| 48 #include "net/base/host_mapping_rules.h" | 49 #include "net/base/host_mapping_rules.h" |
| 49 #include "net/base/net_util.h" | 50 #include "net/base/net_util.h" |
| 50 #include "net/cert/cert_verifier.h" | 51 #include "net/cert/cert_verifier.h" |
| 51 #include "net/cert/cert_verify_proc.h" | 52 #include "net/cert/cert_verify_proc.h" |
| 52 #include "net/cert/ct_known_logs.h" | 53 #include "net/cert/ct_known_logs.h" |
| 53 #include "net/cert/ct_verifier.h" | 54 #include "net/cert/ct_verifier.h" |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 if (DataReductionProxyParams::IsIncludedInFieldTrial()) | 606 if (DataReductionProxyParams::IsIncludedInFieldTrial()) |
| 606 drp_flags |= DataReductionProxyParams::kAllowed; | 607 drp_flags |= DataReductionProxyParams::kAllowed; |
| 607 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) | 608 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
| 608 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; | 609 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; |
| 609 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) | 610 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
| 610 drp_flags |= DataReductionProxyParams::kPromoAllowed; | 611 drp_flags |= DataReductionProxyParams::kPromoAllowed; |
| 611 globals_->data_reduction_proxy_params.reset( | 612 globals_->data_reduction_proxy_params.reset( |
| 612 new DataReductionProxyParams(drp_flags)); | 613 new DataReductionProxyParams(drp_flags)); |
| 613 network_delegate->set_data_reduction_proxy_params( | 614 network_delegate->set_data_reduction_proxy_params( |
| 614 globals_->data_reduction_proxy_params.get()); | 615 globals_->data_reduction_proxy_params.get()); |
| 616 network_delegate->set_on_resolve_proxy_handler( |
| 617 new base::Callback(data_reduction_proxy::OnResolveProxyHandler)); |
| 615 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 618 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
| 616 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 619 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 617 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( | 620 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
| 618 globals_->host_resolver.get())); | 621 globals_->host_resolver.get())); |
| 619 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); | 622 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |
| 620 // For the ProxyScriptFetcher, we use a direct ProxyService. | 623 // For the ProxyScriptFetcher, we use a direct ProxyService. |
| 621 globals_->proxy_script_fetcher_proxy_service.reset( | 624 globals_->proxy_script_fetcher_proxy_service.reset( |
| 622 net::ProxyService::CreateDirectWithNetLog(net_log_)); | 625 net::ProxyService::CreateDirectWithNetLog(net_log_)); |
| 623 // In-memory cookie store. | 626 // In-memory cookie store. |
| 624 globals_->system_cookie_store = | 627 globals_->system_cookie_store = |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 std::string version_flag = | 1202 std::string version_flag = |
| 1200 command_line.GetSwitchValueASCII(switches::kQuicVersion); | 1203 command_line.GetSwitchValueASCII(switches::kQuicVersion); |
| 1201 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1204 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1202 net::QuicVersion version = supported_versions[i]; | 1205 net::QuicVersion version = supported_versions[i]; |
| 1203 if (net::QuicVersionToString(version) == version_flag) { | 1206 if (net::QuicVersionToString(version) == version_flag) { |
| 1204 return version; | 1207 return version; |
| 1205 } | 1208 } |
| 1206 } | 1209 } |
| 1207 return net::QUIC_VERSION_UNSUPPORTED; | 1210 return net::QUIC_VERSION_UNSUPPORTED; |
| 1208 } | 1211 } |
| OLD | NEW |