Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: chrome/browser/io_thread.cc

Issue 169053004: Remove a bunch of unused network flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back IPv6 flags, remove IP pooling flags Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // Only handle use-spdy command line flags if "spdy.disabled" preference is 755 // Only handle use-spdy command line flags if "spdy.disabled" preference is
756 // not disabled via policy. 756 // not disabled via policy.
757 if (is_spdy_disabled_by_policy_) { 757 if (is_spdy_disabled_by_policy_) {
758 base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName); 758 base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName);
759 if (trial) 759 if (trial)
760 trial->Disable(); 760 trial->Disable();
761 } else { 761 } else {
762 std::string spdy_trial_group = 762 std::string spdy_trial_group =
763 base::FieldTrialList::FindFullName(kSpdyFieldTrialName); 763 base::FieldTrialList::FindFullName(kSpdyFieldTrialName);
764 764
765 if (command_line.HasSwitch(switches::kEnableIPPooling))
766 globals_->enable_spdy_ip_pooling.set(true);
767
768 if (command_line.HasSwitch(switches::kDisableIPPooling))
769 globals_->enable_spdy_ip_pooling.set(false);
770
771 if (command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) { 765 if (command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) {
772 // Enable WebSocket over SPDY. 766 // Enable WebSocket over SPDY.
773 net::WebSocketJob::set_websocket_over_spdy_enabled(true); 767 net::WebSocketJob::set_websocket_over_spdy_enabled(true);
774 } 768 }
775 769
776 if (command_line.HasSwitch(switches::kMaxSpdyConcurrentStreams)) {
777 globals_->max_spdy_concurrent_streams_limit.set(
778 GetSwitchValueAsInt(command_line,
779 switches::kMaxSpdyConcurrentStreams));
780 }
781 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { 770 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
782 globals_->trusted_spdy_proxy.set( 771 globals_->trusted_spdy_proxy.set(
783 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy)); 772 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy));
784 } 773 }
785 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) 774 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests))
786 net::URLFetcher::SetIgnoreCertificateRequests(true); 775 net::URLFetcher::SetIgnoreCertificateRequests(true);
787 776
788 if (command_line.HasSwitch(switches::kUseSpdy)) { 777 if (command_line.HasSwitch(switches::kUseSpdy)) {
789 std::string spdy_mode = 778 std::string spdy_mode =
790 command_line.GetSwitchValueASCII(switches::kUseSpdy); 779 command_line.GetSwitchValueASCII(switches::kUseSpdy);
791 EnableSpdy(spdy_mode); 780 EnableSpdy(spdy_mode);
792 } else if (command_line.HasSwitch(switches::kEnableHttp2Draft04)) { 781 } else if (command_line.HasSwitch(switches::kEnableHttp2Draft04)) {
793 net::HttpStreamFactory::EnableNpnHttp2Draft04(); 782 net::HttpStreamFactory::EnableNpnHttp2Draft04();
794 } else if (command_line.HasSwitch(switches::kEnableSpdy4a2)) { 783 } else if (command_line.HasSwitch(switches::kEnableSpdy4a2)) {
795 net::HttpStreamFactory::EnableNpnSpdy4a2(); 784 net::HttpStreamFactory::EnableNpnSpdy4a2();
796 } else if (command_line.HasSwitch(switches::kDisableSpdy31)) { 785 } else if (command_line.HasSwitch(switches::kDisableSpdy31)) {
797 net::HttpStreamFactory::EnableNpnSpdy3(); 786 net::HttpStreamFactory::EnableNpnSpdy3();
798 } else if (command_line.HasSwitch(switches::kEnableSpdy2)) {
799 net::HttpStreamFactory::EnableNpnSpdy31WithSpdy2();
800 } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { 787 } else if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) {
801 net::HttpStreamFactory::EnableNpnHttpOnly(); 788 net::HttpStreamFactory::EnableNpnHttpOnly();
802 } else { 789 } else {
803 if (spdy_trial_group == kSpdyFieldTrialDisabledGroupName && 790 if (spdy_trial_group == kSpdyFieldTrialDisabledGroupName &&
804 !command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) { 791 !command_line.HasSwitch(switches::kEnableWebSocketOverSpdy)) {
805 net::HttpStreamFactory::set_spdy_enabled(false); 792 net::HttpStreamFactory::set_spdy_enabled(false);
806 } else { 793 } else {
807 // Use SPDY/3.1 by default. 794 // Use SPDY/3.1 by default.
808 net::HttpStreamFactory::EnableNpnSpdy31(); 795 net::HttpStreamFactory::EnableNpnSpdy31();
809 } 796 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 globals_->http_server_properties->GetWeakPtr(); 964 globals_->http_server_properties->GetWeakPtr();
978 params->network_delegate = globals_->system_network_delegate.get(); 965 params->network_delegate = globals_->system_network_delegate.get();
979 params->host_mapping_rules = globals_->host_mapping_rules.get(); 966 params->host_mapping_rules = globals_->host_mapping_rules.get();
980 params->ignore_certificate_errors = globals_->ignore_certificate_errors; 967 params->ignore_certificate_errors = globals_->ignore_certificate_errors;
981 params->http_pipelining_enabled = globals_->http_pipelining_enabled; 968 params->http_pipelining_enabled = globals_->http_pipelining_enabled;
982 params->testing_fixed_http_port = globals_->testing_fixed_http_port; 969 params->testing_fixed_http_port = globals_->testing_fixed_http_port;
983 params->testing_fixed_https_port = globals_->testing_fixed_https_port; 970 params->testing_fixed_https_port = globals_->testing_fixed_https_port;
984 971
985 globals_->initial_max_spdy_concurrent_streams.CopyToIfSet( 972 globals_->initial_max_spdy_concurrent_streams.CopyToIfSet(
986 &params->spdy_initial_max_concurrent_streams); 973 &params->spdy_initial_max_concurrent_streams);
987 globals_->max_spdy_concurrent_streams_limit.CopyToIfSet(
988 &params->spdy_max_concurrent_streams_limit);
989 globals_->force_spdy_single_domain.CopyToIfSet( 974 globals_->force_spdy_single_domain.CopyToIfSet(
990 &params->force_spdy_single_domain); 975 &params->force_spdy_single_domain);
991 globals_->enable_spdy_ip_pooling.CopyToIfSet(
992 &params->enable_spdy_ip_pooling);
993 globals_->enable_spdy_compression.CopyToIfSet( 976 globals_->enable_spdy_compression.CopyToIfSet(
994 &params->enable_spdy_compression); 977 &params->enable_spdy_compression);
995 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet( 978 globals_->enable_spdy_ping_based_connection_checking.CopyToIfSet(
996 &params->enable_spdy_ping_based_connection_checking); 979 &params->enable_spdy_ping_based_connection_checking);
997 globals_->spdy_default_protocol.CopyToIfSet( 980 globals_->spdy_default_protocol.CopyToIfSet(
998 &params->spdy_default_protocol); 981 &params->spdy_default_protocol);
999 globals_->trusted_spdy_proxy.CopyToIfSet( 982 globals_->trusted_spdy_proxy.CopyToIfSet(
1000 &params->trusted_spdy_proxy); 983 &params->trusted_spdy_proxy);
1001 globals_->enable_quic.CopyToIfSet(&params->enable_quic); 984 globals_->enable_quic.CopyToIfSet(&params->enable_quic);
1002 globals_->enable_quic_https.CopyToIfSet(&params->enable_quic_https); 985 globals_->enable_quic_https.CopyToIfSet(&params->enable_quic_https);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 std::string version_flag = 1191 std::string version_flag =
1209 command_line.GetSwitchValueASCII(switches::kQuicVersion); 1192 command_line.GetSwitchValueASCII(switches::kQuicVersion);
1210 for (size_t i = 0; i < supported_versions.size(); ++i) { 1193 for (size_t i = 0; i < supported_versions.size(); ++i) {
1211 net::QuicVersion version = supported_versions[i]; 1194 net::QuicVersion version = supported_versions[i];
1212 if (net::QuicVersionToString(version) == version_flag) { 1195 if (net::QuicVersionToString(version) == version_flag) {
1213 return version; 1196 return version;
1214 } 1197 }
1215 } 1198 }
1216 return net::QUIC_VERSION_UNSUPPORTED; 1199 return net::QUIC_VERSION_UNSUPPORTED;
1217 } 1200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698