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