| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 121     RETURN_STRING_LITERAL(QUIC_VERSION_37); | 121     RETURN_STRING_LITERAL(QUIC_VERSION_37); | 
| 122     RETURN_STRING_LITERAL(QUIC_VERSION_38); | 122     RETURN_STRING_LITERAL(QUIC_VERSION_38); | 
| 123     RETURN_STRING_LITERAL(QUIC_VERSION_39); | 123     RETURN_STRING_LITERAL(QUIC_VERSION_39); | 
| 124     RETURN_STRING_LITERAL(QUIC_VERSION_40); | 124     RETURN_STRING_LITERAL(QUIC_VERSION_40); | 
| 125     RETURN_STRING_LITERAL(QUIC_VERSION_41); | 125     RETURN_STRING_LITERAL(QUIC_VERSION_41); | 
| 126     default: | 126     default: | 
| 127       return "QUIC_VERSION_UNSUPPORTED"; | 127       return "QUIC_VERSION_UNSUPPORTED"; | 
| 128   } | 128   } | 
| 129 } | 129 } | 
| 130 | 130 | 
|  | 131 #undef RETURN_STRING_LITERAL | 
|  | 132 | 
| 131 string QuicVersionVectorToString(const QuicVersionVector& versions) { | 133 string QuicVersionVectorToString(const QuicVersionVector& versions) { | 
| 132   string result = ""; | 134   string result = ""; | 
| 133   for (size_t i = 0; i < versions.size(); ++i) { | 135   for (size_t i = 0; i < versions.size(); ++i) { | 
| 134     if (i != 0) { | 136     if (i != 0) { | 
| 135       result.append(","); | 137       result.append(","); | 
| 136     } | 138     } | 
| 137     result.append(QuicVersionToString(versions[i])); | 139     result.append(QuicVersionToString(versions[i])); | 
| 138   } | 140   } | 
| 139   return result; | 141   return result; | 
| 140 } | 142 } | 
| 141 | 143 | 
| 142 }  // namespace net | 144 }  // namespace net | 
| OLD | NEW | 
|---|