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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 globals_->max_spdy_concurrent_streams_limit.set( | 652 globals_->max_spdy_concurrent_streams_limit.set( |
653 GetSwitchValueAsInt(command_line, switches::kMaxSpdyConcurrentStreams)); | 653 GetSwitchValueAsInt(command_line, switches::kMaxSpdyConcurrentStreams)); |
654 } | 654 } |
655 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) | 655 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) |
656 net::URLFetcher::SetIgnoreCertificateRequests(true); | 656 net::URLFetcher::SetIgnoreCertificateRequests(true); |
657 | 657 |
658 if (command_line.HasSwitch(switches::kUseSpdy)) { | 658 if (command_line.HasSwitch(switches::kUseSpdy)) { |
659 std::string spdy_mode = | 659 std::string spdy_mode = |
660 command_line.GetSwitchValueASCII(switches::kUseSpdy); | 660 command_line.GetSwitchValueASCII(switches::kUseSpdy); |
661 EnableSpdy(spdy_mode); | 661 EnableSpdy(spdy_mode); |
| 662 } else if (command_line.HasSwitch(switches::kEnableSpdy4a1)) { |
| 663 net::HttpStreamFactory::EnableNpnSpdy4a1(); |
662 } else if (command_line.HasSwitch(switches::kEnableSpdy31)) { | 664 } else if (command_line.HasSwitch(switches::kEnableSpdy31)) { |
663 net::HttpStreamFactory::EnableNpnSpdy31(); | 665 net::HttpStreamFactory::EnableNpnSpdy31(); |
664 } else if (command_line.HasSwitch(switches::kEnableNpn)) { | 666 } else if (command_line.HasSwitch(switches::kEnableNpn)) { |
665 net::HttpStreamFactory::EnableNpnSpdy(); | 667 net::HttpStreamFactory::EnableNpnSpdy(); |
666 } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { | 668 } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { |
667 net::HttpStreamFactory::EnableNpnHttpOnly(); | 669 net::HttpStreamFactory::EnableNpnHttpOnly(); |
668 } else { | 670 } else { |
669 // Use SPDY/3 by default. | 671 // Use SPDY/3 by default. |
670 net::HttpStreamFactory::EnableNpnSpdy3(); | 672 net::HttpStreamFactory::EnableNpnSpdy3(); |
671 } | 673 } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 globals_->system_request_context.reset( | 917 globals_->system_request_context.reset( |
916 ConstructSystemRequestContext(globals_, net_log_)); | 918 ConstructSystemRequestContext(globals_, net_log_)); |
917 | 919 |
918 sdch_manager_->set_sdch_fetcher( | 920 sdch_manager_->set_sdch_fetcher( |
919 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 921 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
920 } | 922 } |
921 | 923 |
922 void IOThread::UpdateDnsClientEnabled() { | 924 void IOThread::UpdateDnsClientEnabled() { |
923 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 925 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
924 } | 926 } |
OLD | NEW |