| 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 "net/quic/core/quic_versions.h" | 5 #include "net/quic/core/quic_versions.h" |
| 6 | 6 |
| 7 #include "net/quic/core/quic_error_codes.h" | 7 #include "net/quic/core/quic_error_codes.h" |
| 8 #include "net/quic/core/quic_tag.h" | 8 #include "net/quic/core/quic_tag.h" |
| 9 #include "net/quic/core/quic_types.h" | 9 #include "net/quic/core/quic_types.h" |
| 10 #include "net/quic/platform/api/quic_flags.h" | 10 #include "net/quic/platform/api/quic_flags.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 RETURN_STRING_LITERAL(QUIC_VERSION_36); | 111 RETURN_STRING_LITERAL(QUIC_VERSION_36); |
| 112 RETURN_STRING_LITERAL(QUIC_VERSION_37); | 112 RETURN_STRING_LITERAL(QUIC_VERSION_37); |
| 113 RETURN_STRING_LITERAL(QUIC_VERSION_38); | 113 RETURN_STRING_LITERAL(QUIC_VERSION_38); |
| 114 RETURN_STRING_LITERAL(QUIC_VERSION_39); | 114 RETURN_STRING_LITERAL(QUIC_VERSION_39); |
| 115 RETURN_STRING_LITERAL(QUIC_VERSION_40); | 115 RETURN_STRING_LITERAL(QUIC_VERSION_40); |
| 116 default: | 116 default: |
| 117 return "QUIC_VERSION_UNSUPPORTED"; | 117 return "QUIC_VERSION_UNSUPPORTED"; |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 #undef RETURN_STRING_LITERAL |
| 122 |
| 121 string QuicVersionVectorToString(const QuicVersionVector& versions) { | 123 string QuicVersionVectorToString(const QuicVersionVector& versions) { |
| 122 string result = ""; | 124 string result = ""; |
| 123 for (size_t i = 0; i < versions.size(); ++i) { | 125 for (size_t i = 0; i < versions.size(); ++i) { |
| 124 if (i != 0) { | 126 if (i != 0) { |
| 125 result.append(","); | 127 result.append(","); |
| 126 } | 128 } |
| 127 result.append(QuicVersionToString(versions[i])); | 129 result.append(QuicVersionToString(versions[i])); |
| 128 } | 130 } |
| 129 return result; | 131 return result; |
| 130 } | 132 } |
| 131 | 133 |
| 132 } // namespace net | 134 } // namespace net |
| OLD | NEW |