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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 job_factory->SetProtocolHandler( | 642 job_factory->SetProtocolHandler( |
643 chrome::kFileScheme, | 643 chrome::kFileScheme, |
644 new net::FileProtocolHandler( | 644 new net::FileProtocolHandler( |
645 content::BrowserThread::GetBlockingPool()-> | 645 content::BrowserThread::GetBlockingPool()-> |
646 GetTaskRunnerWithShutdownBehavior( | 646 GetTaskRunnerWithShutdownBehavior( |
647 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 647 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
648 #if !defined(DISABLE_FTP_SUPPORT) | 648 #if !defined(DISABLE_FTP_SUPPORT) |
649 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( | 649 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( |
650 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 650 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
651 job_factory->SetProtocolHandler( | 651 job_factory->SetProtocolHandler( |
652 chrome::kFtpScheme, | 652 content::kFtpScheme, |
653 new net::FtpProtocolHandler( | 653 new net::FtpProtocolHandler( |
654 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); | 654 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); |
655 #endif | 655 #endif |
656 globals_->proxy_script_fetcher_url_request_job_factory = | 656 globals_->proxy_script_fetcher_url_request_job_factory = |
657 job_factory.PassAs<net::URLRequestJobFactory>(); | 657 job_factory.PassAs<net::URLRequestJobFactory>(); |
658 | 658 |
659 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); | 659 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); |
660 globals_->throttler_manager->set_net_log(net_log_); | 660 globals_->throttler_manager->set_net_log(net_log_); |
661 // Always done in production, disabled only for unit tests. | 661 // Always done in production, disabled only for unit tests. |
662 globals_->throttler_manager->set_enable_thread_checks(true); | 662 globals_->throttler_manager->set_enable_thread_checks(true); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 if (!length_str.ends_with(kQuicFieldTrialPacketLengthSuffix)) { | 1116 if (!length_str.ends_with(kQuicFieldTrialPacketLengthSuffix)) { |
1117 return 0; | 1117 return 0; |
1118 } | 1118 } |
1119 length_str.remove_suffix(strlen(kQuicFieldTrialPacketLengthSuffix)); | 1119 length_str.remove_suffix(strlen(kQuicFieldTrialPacketLengthSuffix)); |
1120 unsigned value; | 1120 unsigned value; |
1121 if (!base::StringToUint(length_str, &value)) { | 1121 if (!base::StringToUint(length_str, &value)) { |
1122 return 0; | 1122 return 0; |
1123 } | 1123 } |
1124 return value; | 1124 return value; |
1125 } | 1125 } |
OLD | NEW |