| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 job_factory->SetProtocolHandler( | 588 job_factory->SetProtocolHandler( |
| 589 chrome::kFtpScheme, | 589 chrome::kFtpScheme, |
| 590 new net::FtpProtocolHandler( | 590 new net::FtpProtocolHandler( |
| 591 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); | 591 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); |
| 592 #endif | 592 #endif |
| 593 globals_->proxy_script_fetcher_url_request_job_factory = | 593 globals_->proxy_script_fetcher_url_request_job_factory = |
| 594 job_factory.PassAs<net::URLRequestJobFactory>(); | 594 job_factory.PassAs<net::URLRequestJobFactory>(); |
| 595 | 595 |
| 596 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); | 596 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); |
| 597 globals_->throttler_manager->set_net_log(net_log_); | 597 globals_->throttler_manager->set_net_log(net_log_); |
| 598 // Always done in production, disabled only for unit tests. |
| 599 globals_->throttler_manager->set_enable_thread_checks(true); |
| 598 | 600 |
| 599 globals_->proxy_script_fetcher_context.reset( | 601 globals_->proxy_script_fetcher_context.reset( |
| 600 ConstructProxyScriptFetcherContext(globals_, net_log_)); | 602 ConstructProxyScriptFetcherContext(globals_, net_log_)); |
| 601 | 603 |
| 602 globals_->network_time_notifier.reset( | 604 globals_->network_time_notifier.reset( |
| 603 new net::NetworkTimeNotifier( | 605 new net::NetworkTimeNotifier( |
| 604 scoped_ptr<base::TickClock>(new base::DefaultTickClock()))); | 606 scoped_ptr<base::TickClock>(new base::DefaultTickClock()))); |
| 605 | 607 |
| 606 sdch_manager_ = new net::SdchManager(); | 608 sdch_manager_ = new net::SdchManager(); |
| 607 | 609 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 if (command_line.HasSwitch(switches::kDisableQuic)) | 972 if (command_line.HasSwitch(switches::kDisableQuic)) |
| 971 return false; | 973 return false; |
| 972 | 974 |
| 973 if (command_line.HasSwitch(switches::kEnableQuic) || | 975 if (command_line.HasSwitch(switches::kEnableQuic) || |
| 974 command_line.HasSwitch(switches::kEnableQuicHttps)) { | 976 command_line.HasSwitch(switches::kEnableQuicHttps)) { |
| 975 return true; | 977 return true; |
| 976 } | 978 } |
| 977 | 979 |
| 978 return quic_trial_group == kQuicFieldTrialEnabledGroupName; | 980 return quic_trial_group == kQuicFieldTrialEnabledGroupName; |
| 979 } | 981 } |
| OLD | NEW |