| 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 globals->use_alternate_protocols.set(true); | 868 globals->use_alternate_protocols.set(true); |
| 869 } else if (spdy_trial_group.starts_with( | 869 } else if (spdy_trial_group.starts_with( |
| 870 kSpdyFieldTrialSpdy4GroupNamePrefix)) { | 870 kSpdyFieldTrialSpdy4GroupNamePrefix)) { |
| 871 globals->next_protos = net::NextProtosSpdy4Http2(); | 871 globals->next_protos = net::NextProtosSpdy4Http2(); |
| 872 globals->use_alternate_protocols.set(true); | 872 globals->use_alternate_protocols.set(true); |
| 873 } else if (spdy_trial_group == kSpdyFieldTrialSpdy4ControlGroupName) { | 873 } else if (spdy_trial_group == kSpdyFieldTrialSpdy4ControlGroupName) { |
| 874 // This control group is pinned at SPDY/3.1. | 874 // This control group is pinned at SPDY/3.1. |
| 875 globals->next_protos = net::NextProtosSpdy31(); | 875 globals->next_protos = net::NextProtosSpdy31(); |
| 876 globals->use_alternate_protocols.set(true); | 876 globals->use_alternate_protocols.set(true); |
| 877 } else { | 877 } else { |
| 878 // Use the current SPDY default (SPDY/3.1). | 878 // By default, enable HTTP/2. |
| 879 globals->next_protos = net::NextProtosSpdy31(); | 879 globals->next_protos = net::NextProtosSpdy4Http2(); |
| 880 globals->use_alternate_protocols.set(true); | 880 globals->use_alternate_protocols.set(true); |
| 881 } | 881 } |
| 882 } | 882 } |
| 883 | 883 |
| 884 void IOThread::EnableSpdy(const std::string& mode) { | 884 void IOThread::EnableSpdy(const std::string& mode) { |
| 885 static const char kOff[] = "off"; | 885 static const char kOff[] = "off"; |
| 886 static const char kSSL[] = "ssl"; | 886 static const char kSSL[] = "ssl"; |
| 887 static const char kDisableSSL[] = "no-ssl"; | 887 static const char kDisableSSL[] = "no-ssl"; |
| 888 static const char kDisablePing[] = "no-ping"; | 888 static const char kDisablePing[] = "no-ping"; |
| 889 static const char kExclude[] = "exclude"; // Hosts to exclude | 889 static const char kExclude[] = "exclude"; // Hosts to exclude |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1407 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1408 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1408 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1409 net::QuicVersion version = supported_versions[i]; | 1409 net::QuicVersion version = supported_versions[i]; |
| 1410 if (net::QuicVersionToString(version) == quic_version) { | 1410 if (net::QuicVersionToString(version) == quic_version) { |
| 1411 return version; | 1411 return version; |
| 1412 } | 1412 } |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 return net::QUIC_VERSION_UNSUPPORTED; | 1415 return net::QUIC_VERSION_UNSUPPORTED; |
| 1416 } | 1416 } |
| OLD | NEW |