| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 scoped_refptr<net::HttpNetworkSession> network_session( | 637 scoped_refptr<net::HttpNetworkSession> network_session( |
| 638 new net::HttpNetworkSession(session_params)); | 638 new net::HttpNetworkSession(session_params)); |
| 639 globals_->proxy_script_fetcher_http_transaction_factory | 639 globals_->proxy_script_fetcher_http_transaction_factory |
| 640 .reset(new net::HttpNetworkLayer(network_session.get())); | 640 .reset(new net::HttpNetworkLayer(network_session.get())); |
| 641 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); | 641 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); |
| 642 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( | 642 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( |
| 643 new net::URLRequestJobFactoryImpl()); | 643 new net::URLRequestJobFactoryImpl()); |
| 644 job_factory->SetProtocolHandler(chrome::kDataScheme, | 644 job_factory->SetProtocolHandler(chrome::kDataScheme, |
| 645 new net::DataProtocolHandler()); | 645 new net::DataProtocolHandler()); |
| 646 job_factory->SetProtocolHandler( | 646 job_factory->SetProtocolHandler( |
| 647 chrome::kFileScheme, | 647 content::kFileScheme, |
| 648 new net::FileProtocolHandler( | 648 new net::FileProtocolHandler( |
| 649 content::BrowserThread::GetBlockingPool()-> | 649 content::BrowserThread::GetBlockingPool()-> |
| 650 GetTaskRunnerWithShutdownBehavior( | 650 GetTaskRunnerWithShutdownBehavior( |
| 651 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 651 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
| 652 #if !defined(DISABLE_FTP_SUPPORT) | 652 #if !defined(DISABLE_FTP_SUPPORT) |
| 653 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( | 653 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( |
| 654 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 654 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
| 655 job_factory->SetProtocolHandler( | 655 job_factory->SetProtocolHandler( |
| 656 content::kFtpScheme, | 656 content::kFtpScheme, |
| 657 new net::FtpProtocolHandler( | 657 new net::FtpProtocolHandler( |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 std::string version_flag = | 1155 std::string version_flag = |
| 1156 command_line.GetSwitchValueASCII(switches::kQuicVersion); | 1156 command_line.GetSwitchValueASCII(switches::kQuicVersion); |
| 1157 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1157 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1158 net::QuicVersion version = supported_versions[i]; | 1158 net::QuicVersion version = supported_versions[i]; |
| 1159 if (net::QuicVersionToString(version) == version_flag) { | 1159 if (net::QuicVersionToString(version) == version_flag) { |
| 1160 return version; | 1160 return version; |
| 1161 } | 1161 } |
| 1162 } | 1162 } |
| 1163 return net::QUIC_VERSION_UNSUPPORTED; | 1163 return net::QUIC_VERSION_UNSUPPORTED; |
| 1164 } | 1164 } |
| OLD | NEW |