| 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 .reset(new net::HttpNetworkLayer(network_session.get())); | 848 .reset(new net::HttpNetworkLayer(network_session.get())); |
| 849 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); | 849 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); |
| 850 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( | 850 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( |
| 851 new net::URLRequestJobFactoryImpl()); | 851 new net::URLRequestJobFactoryImpl()); |
| 852 | 852 |
| 853 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 853 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 854 // is fixed. | 854 // is fixed. |
| 855 tracked_objects::ScopedTracker tracking_profile16( | 855 tracked_objects::ScopedTracker tracking_profile16( |
| 856 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 856 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 857 "466432 IOThread::InitAsync::SetProtocolHandler")); | 857 "466432 IOThread::InitAsync::SetProtocolHandler")); |
| 858 job_factory->SetProtocolHandler(url::kDataScheme, | 858 job_factory->SetProtocolHandler( |
| 859 new net::DataProtocolHandler()); | 859 url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler())); |
| 860 job_factory->SetProtocolHandler( | 860 job_factory->SetProtocolHandler( |
| 861 url::kFileScheme, | 861 url::kFileScheme, |
| 862 new net::FileProtocolHandler( | 862 make_scoped_ptr(new net::FileProtocolHandler( |
| 863 content::BrowserThread::GetBlockingPool()-> | 863 content::BrowserThread::GetBlockingPool() |
| 864 GetTaskRunnerWithShutdownBehavior( | 864 ->GetTaskRunnerWithShutdownBehavior( |
| 865 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 865 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); |
| 866 #if !defined(DISABLE_FTP_SUPPORT) | 866 #if !defined(DISABLE_FTP_SUPPORT) |
| 867 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( | 867 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( |
| 868 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 868 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
| 869 job_factory->SetProtocolHandler( | 869 job_factory->SetProtocolHandler( |
| 870 url::kFtpScheme, | 870 url::kFtpScheme, |
| 871 new net::FtpProtocolHandler( | 871 make_scoped_ptr(new net::FtpProtocolHandler( |
| 872 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); | 872 globals_->proxy_script_fetcher_ftp_transaction_factory.get()))); |
| 873 #endif | 873 #endif |
| 874 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 874 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
| 875 | 875 |
| 876 globals_->proxy_script_fetcher_context.reset( | 876 globals_->proxy_script_fetcher_context.reset( |
| 877 ConstructProxyScriptFetcherContext(globals_, net_log_)); | 877 ConstructProxyScriptFetcherContext(globals_, net_log_)); |
| 878 | 878 |
| 879 const version_info::Channel channel = chrome::GetChannel(); | 879 const version_info::Channel channel = chrome::GetChannel(); |
| 880 if (channel == version_info::Channel::UNKNOWN || | 880 if (channel == version_info::Channel::UNKNOWN || |
| 881 channel == version_info::Channel::CANARY || | 881 channel == version_info::Channel::CANARY || |
| 882 channel == version_info::Channel::DEV) { | 882 channel == version_info::Channel::DEV) { |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1602 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1603 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1603 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1604 net::QuicVersion version = supported_versions[i]; | 1604 net::QuicVersion version = supported_versions[i]; |
| 1605 if (net::QuicVersionToString(version) == quic_version) { | 1605 if (net::QuicVersionToString(version) == quic_version) { |
| 1606 return version; | 1606 return version; |
| 1607 } | 1607 } |
| 1608 } | 1608 } |
| 1609 | 1609 |
| 1610 return net::QUIC_VERSION_UNSUPPORTED; | 1610 return net::QUIC_VERSION_UNSUPPORTED; |
| 1611 } | 1611 } |
| OLD | NEW |