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/browser/net/sdch_dictionary_fetcher.h" | 39 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
40 #include "chrome/common/chrome_content_client.h" | 40 #include "chrome/common/chrome_content_client.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/chrome_version_info.h" | 42 #include "chrome/common/chrome_version_info.h" |
43 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
44 #include "chrome/common/url_constants.h" | |
45 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" | 44 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" |
46 #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" |
47 #include "components/policy/core/common/policy_service.h" | 46 #include "components/policy/core/common/policy_service.h" |
48 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
49 #include "content/public/browser/cookie_store_factory.h" | 48 #include "content/public/browser/cookie_store_factory.h" |
50 #include "net/base/host_mapping_rules.h" | 49 #include "net/base/host_mapping_rules.h" |
51 #include "net/base/net_util.h" | 50 #include "net/base/net_util.h" |
52 #include "net/base/sdch_manager.h" | 51 #include "net/base/sdch_manager.h" |
53 #include "net/cert/cert_verifier.h" | 52 #include "net/cert/cert_verifier.h" |
54 #include "net/cert/cert_verify_proc.h" | 53 #include "net/cert/cert_verify_proc.h" |
(...skipping 18 matching lines...) Expand all Loading... |
73 #include "net/ssl/default_server_bound_cert_store.h" | 72 #include "net/ssl/default_server_bound_cert_store.h" |
74 #include "net/ssl/server_bound_cert_service.h" | 73 #include "net/ssl/server_bound_cert_service.h" |
75 #include "net/url_request/data_protocol_handler.h" | 74 #include "net/url_request/data_protocol_handler.h" |
76 #include "net/url_request/file_protocol_handler.h" | 75 #include "net/url_request/file_protocol_handler.h" |
77 #include "net/url_request/ftp_protocol_handler.h" | 76 #include "net/url_request/ftp_protocol_handler.h" |
78 #include "net/url_request/static_http_user_agent_settings.h" | 77 #include "net/url_request/static_http_user_agent_settings.h" |
79 #include "net/url_request/url_fetcher.h" | 78 #include "net/url_request/url_fetcher.h" |
80 #include "net/url_request/url_request_job_factory_impl.h" | 79 #include "net/url_request/url_request_job_factory_impl.h" |
81 #include "net/url_request/url_request_throttler_manager.h" | 80 #include "net/url_request/url_request_throttler_manager.h" |
82 #include "net/websockets/websocket_job.h" | 81 #include "net/websockets/websocket_job.h" |
| 82 #include "url/url_constants.h" |
83 | 83 |
84 #if defined(ENABLE_CONFIGURATION_POLICY) | 84 #if defined(ENABLE_CONFIGURATION_POLICY) |
85 #include "policy/policy_constants.h" | 85 #include "policy/policy_constants.h" |
86 #endif | 86 #endif |
87 | 87 |
88 #if !defined(USE_OPENSSL) | 88 #if !defined(USE_OPENSSL) |
89 #include "net/cert/ct_log_verifier.h" | 89 #include "net/cert/ct_log_verifier.h" |
90 #include "net/cert/multi_log_ct_verifier.h" | 90 #include "net/cert/multi_log_ct_verifier.h" |
91 #endif | 91 #endif |
92 | 92 |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 globals_->proxy_script_fetcher_proxy_service.get(); | 648 globals_->proxy_script_fetcher_proxy_service.get(); |
649 | 649 |
650 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession"); | 650 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession"); |
651 scoped_refptr<net::HttpNetworkSession> network_session( | 651 scoped_refptr<net::HttpNetworkSession> network_session( |
652 new net::HttpNetworkSession(session_params)); | 652 new net::HttpNetworkSession(session_params)); |
653 globals_->proxy_script_fetcher_http_transaction_factory | 653 globals_->proxy_script_fetcher_http_transaction_factory |
654 .reset(new net::HttpNetworkLayer(network_session.get())); | 654 .reset(new net::HttpNetworkLayer(network_session.get())); |
655 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); | 655 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); |
656 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( | 656 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( |
657 new net::URLRequestJobFactoryImpl()); | 657 new net::URLRequestJobFactoryImpl()); |
658 job_factory->SetProtocolHandler(content::kDataScheme, | 658 job_factory->SetProtocolHandler(url::kDataScheme, |
659 new net::DataProtocolHandler()); | 659 new net::DataProtocolHandler()); |
660 job_factory->SetProtocolHandler( | 660 job_factory->SetProtocolHandler( |
661 content::kFileScheme, | 661 url::kFileScheme, |
662 new net::FileProtocolHandler( | 662 new net::FileProtocolHandler( |
663 content::BrowserThread::GetBlockingPool()-> | 663 content::BrowserThread::GetBlockingPool()-> |
664 GetTaskRunnerWithShutdownBehavior( | 664 GetTaskRunnerWithShutdownBehavior( |
665 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 665 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
666 #if !defined(DISABLE_FTP_SUPPORT) | 666 #if !defined(DISABLE_FTP_SUPPORT) |
667 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( | 667 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( |
668 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 668 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
669 job_factory->SetProtocolHandler( | 669 job_factory->SetProtocolHandler( |
670 content::kFtpScheme, | 670 url::kFtpScheme, |
671 new net::FtpProtocolHandler( | 671 new net::FtpProtocolHandler( |
672 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); | 672 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); |
673 #endif | 673 #endif |
674 globals_->proxy_script_fetcher_url_request_job_factory = | 674 globals_->proxy_script_fetcher_url_request_job_factory = |
675 job_factory.PassAs<net::URLRequestJobFactory>(); | 675 job_factory.PassAs<net::URLRequestJobFactory>(); |
676 | 676 |
677 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); | 677 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); |
678 globals_->throttler_manager->set_net_log(net_log_); | 678 globals_->throttler_manager->set_net_log(net_log_); |
679 // Always done in production, disabled only for unit tests. | 679 // Always done in production, disabled only for unit tests. |
680 globals_->throttler_manager->set_enable_thread_checks(true); | 680 globals_->throttler_manager->set_enable_thread_checks(true); |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 std::string version_flag = | 1200 std::string version_flag = |
1201 command_line.GetSwitchValueASCII(switches::kQuicVersion); | 1201 command_line.GetSwitchValueASCII(switches::kQuicVersion); |
1202 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1202 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1203 net::QuicVersion version = supported_versions[i]; | 1203 net::QuicVersion version = supported_versions[i]; |
1204 if (net::QuicVersionToString(version) == version_flag) { | 1204 if (net::QuicVersionToString(version) == version_flag) { |
1205 return version; | 1205 return version; |
1206 } | 1206 } |
1207 } | 1207 } |
1208 return net::QUIC_VERSION_UNSUPPORTED; | 1208 return net::QUIC_VERSION_UNSUPPORTED; |
1209 } | 1209 } |
OLD | NEW |