| 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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 | 1027 |
| 1028 if (command_line.HasSwitch(switches::kEnableSpdy4)) { | 1028 if (command_line.HasSwitch(switches::kEnableSpdy4)) { |
| 1029 globals->next_protos.push_back(net::kProtoSPDY31); | 1029 globals->next_protos.push_back(net::kProtoSPDY31); |
| 1030 globals->next_protos.push_back(net::kProtoSPDY4_14); | 1030 globals->next_protos.push_back(net::kProtoSPDY4_14); |
| 1031 globals->next_protos.push_back(net::kProtoSPDY4); | 1031 globals->next_protos.push_back(net::kProtoSPDY4); |
| 1032 globals->use_alternate_protocols.set(true); | 1032 globals->use_alternate_protocols.set(true); |
| 1033 return; | 1033 return; |
| 1034 } | 1034 } |
| 1035 if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { | 1035 if (command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { |
| 1036 globals->use_alternate_protocols.set(false); | 1036 globals->use_alternate_protocols.set(false); |
| 1037 net::HttpStreamFactory::set_spdy_enabled(false); |
| 1037 return; | 1038 return; |
| 1038 } | 1039 } |
| 1039 | 1040 |
| 1040 // No SPDY command-line flags have been specified. Examine trial groups. | 1041 // No SPDY command-line flags have been specified. Examine trial groups. |
| 1041 if (spdy_trial_group.starts_with(kSpdyFieldTrialHoldbackGroupNamePrefix)) { | 1042 if (spdy_trial_group.starts_with(kSpdyFieldTrialHoldbackGroupNamePrefix)) { |
| 1042 net::HttpStreamFactory::set_spdy_enabled(false); | 1043 net::HttpStreamFactory::set_spdy_enabled(false); |
| 1043 return; | 1044 return; |
| 1044 } | 1045 } |
| 1045 if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy31GroupNamePrefix)) { | 1046 if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy31GroupNamePrefix)) { |
| 1046 globals->next_protos.push_back(net::kProtoSPDY31); | 1047 globals->next_protos.push_back(net::kProtoSPDY31); |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1634 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1634 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1635 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1635 net::QuicVersion version = supported_versions[i]; | 1636 net::QuicVersion version = supported_versions[i]; |
| 1636 if (net::QuicVersionToString(version) == quic_version) { | 1637 if (net::QuicVersionToString(version) == quic_version) { |
| 1637 return version; | 1638 return version; |
| 1638 } | 1639 } |
| 1639 } | 1640 } |
| 1640 | 1641 |
| 1641 return net::QUIC_VERSION_UNSUPPORTED; | 1642 return net::QUIC_VERSION_UNSUPPORTED; |
| 1642 } | 1643 } |
| OLD | NEW |