Chromium Code Reviews| 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/http/http_response_info.h" | 5 #include "net/http/http_response_info.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 419 | 419 |
| 420 if (ssl_info.is_valid() && ssl_info.key_exchange_group != 0) | 420 if (ssl_info.is_valid() && ssl_info.key_exchange_group != 0) |
| 421 pickle->WriteInt(ssl_info.key_exchange_group); | 421 pickle->WriteInt(ssl_info.key_exchange_group); |
| 422 } | 422 } |
| 423 | 423 |
| 424 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto( | 424 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto( |
| 425 NextProto next_proto) { | 425 NextProto next_proto) { |
| 426 switch (next_proto) { | 426 switch (next_proto) { |
| 427 case kProtoHTTP2: | 427 case kProtoHTTP2: |
| 428 return CONNECTION_INFO_HTTP2; | 428 return CONNECTION_INFO_HTTP2; |
| 429 case kProtoQUIC1SPDY3: | 429 case kProtoQUIC: |
| 430 return CONNECTION_INFO_QUIC1_SPDY3; | 430 return CONNECTION_INFO_QUIC; |
| 431 | 431 |
| 432 case kProtoUnknown: | 432 case kProtoUnknown: |
| 433 case kProtoHTTP11: | 433 case kProtoHTTP11: |
| 434 break; | 434 break; |
| 435 } | 435 } |
| 436 | 436 |
| 437 NOTREACHED(); | 437 NOTREACHED(); |
| 438 return CONNECTION_INFO_UNKNOWN; | 438 return CONNECTION_INFO_UNKNOWN; |
| 439 } | 439 } |
| 440 | 440 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 452 case CONNECTION_INFO_DEPRECATED_SPDY3: | 452 case CONNECTION_INFO_DEPRECATED_SPDY3: |
| 453 return "spdy/3"; | 453 return "spdy/3"; |
| 454 // Since ConnectionInfo is persisted to disk, deprecated values have to be | 454 // Since ConnectionInfo is persisted to disk, deprecated values have to be |
| 455 // handled. Note that h2-14 and h2-15 are essentially wire compatible with | 455 // handled. Note that h2-14 and h2-15 are essentially wire compatible with |
| 456 // h2. | 456 // h2. |
| 457 // Intentional fallthrough. | 457 // Intentional fallthrough. |
| 458 case CONNECTION_INFO_DEPRECATED_HTTP2_14: | 458 case CONNECTION_INFO_DEPRECATED_HTTP2_14: |
| 459 case CONNECTION_INFO_DEPRECATED_HTTP2_15: | 459 case CONNECTION_INFO_DEPRECATED_HTTP2_15: |
| 460 case CONNECTION_INFO_HTTP2: | 460 case CONNECTION_INFO_HTTP2: |
| 461 return "h2"; | 461 return "h2"; |
| 462 case CONNECTION_INFO_QUIC1_SPDY3: | 462 case CONNECTION_INFO_QUIC: |
| 463 return "quic/1+spdy/3"; | 463 return "quic/1+spdy/3"; |
|
Ryan Hamilton
2016/10/19 23:07:52
And of course we should fix this once we get conse
Bence
2016/10/20 12:22:50
Acknowledged.
| |
| 464 case CONNECTION_INFO_HTTP0_9: | 464 case CONNECTION_INFO_HTTP0_9: |
| 465 return "http/0.9"; | 465 return "http/0.9"; |
| 466 case CONNECTION_INFO_HTTP1_0: | 466 case CONNECTION_INFO_HTTP1_0: |
| 467 return "http/1.0"; | 467 return "http/1.0"; |
| 468 case NUM_OF_CONNECTION_INFOS: | 468 case NUM_OF_CONNECTION_INFOS: |
| 469 break; | 469 break; |
| 470 } | 470 } |
| 471 NOTREACHED(); | 471 NOTREACHED(); |
| 472 return ""; | 472 return ""; |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace net | 475 } // namespace net |
| OLD | NEW |