| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 switch (next_proto) { | 375 switch (next_proto) { |
| 376 case kProtoDeprecatedSPDY2: | 376 case kProtoDeprecatedSPDY2: |
| 377 return CONNECTION_INFO_DEPRECATED_SPDY2; | 377 return CONNECTION_INFO_DEPRECATED_SPDY2; |
| 378 case kProtoSPDY3: | 378 case kProtoSPDY3: |
| 379 case kProtoSPDY31: | 379 case kProtoSPDY31: |
| 380 return CONNECTION_INFO_SPDY3; | 380 return CONNECTION_INFO_SPDY3; |
| 381 case kProtoSPDY4_14: | 381 case kProtoSPDY4_14: |
| 382 return CONNECTION_INFO_HTTP2_14; | 382 return CONNECTION_INFO_HTTP2_14; |
| 383 case kProtoSPDY4_15: | 383 case kProtoSPDY4_15: |
| 384 return CONNECTION_INFO_HTTP2_15; | 384 return CONNECTION_INFO_HTTP2_15; |
| 385 case kProtoSPDY4: |
| 386 return CONNECTION_INFO_HTTP2; |
| 385 case kProtoQUIC1SPDY3: | 387 case kProtoQUIC1SPDY3: |
| 386 return CONNECTION_INFO_QUIC1_SPDY3; | 388 return CONNECTION_INFO_QUIC1_SPDY3; |
| 387 | 389 |
| 388 case kProtoUnknown: | 390 case kProtoUnknown: |
| 389 case kProtoHTTP11: | 391 case kProtoHTTP11: |
| 390 break; | 392 break; |
| 391 } | 393 } |
| 392 | 394 |
| 393 NOTREACHED(); | 395 NOTREACHED(); |
| 394 return CONNECTION_INFO_UNKNOWN; | 396 return CONNECTION_INFO_UNKNOWN; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 406 return "spdy/2"; | 408 return "spdy/2"; |
| 407 case CONNECTION_INFO_SPDY3: | 409 case CONNECTION_INFO_SPDY3: |
| 408 return "spdy/3"; | 410 return "spdy/3"; |
| 409 case CONNECTION_INFO_HTTP2_14: | 411 case CONNECTION_INFO_HTTP2_14: |
| 410 // For internal consistency, HTTP/2 is named SPDY4 within Chromium. | 412 // For internal consistency, HTTP/2 is named SPDY4 within Chromium. |
| 411 // This is the HTTP/2 draft-14 identifier. | 413 // This is the HTTP/2 draft-14 identifier. |
| 412 return "h2-14"; | 414 return "h2-14"; |
| 413 case CONNECTION_INFO_HTTP2_15: | 415 case CONNECTION_INFO_HTTP2_15: |
| 414 // This is the HTTP/2 draft-15 identifier. | 416 // This is the HTTP/2 draft-15 identifier. |
| 415 return "h2-15"; | 417 return "h2-15"; |
| 418 case CONNECTION_INFO_HTTP2: |
| 419 return "h2"; |
| 416 case CONNECTION_INFO_QUIC1_SPDY3: | 420 case CONNECTION_INFO_QUIC1_SPDY3: |
| 417 return "quic/1+spdy/3"; | 421 return "quic/1+spdy/3"; |
| 418 case NUM_OF_CONNECTION_INFOS: | 422 case NUM_OF_CONNECTION_INFOS: |
| 419 break; | 423 break; |
| 420 } | 424 } |
| 421 NOTREACHED(); | 425 NOTREACHED(); |
| 422 return ""; | 426 return ""; |
| 423 } | 427 } |
| 424 | 428 |
| 425 } // namespace net | 429 } // namespace net |
| OLD | NEW |