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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
400 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto( | 400 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto( |
401 NextProto next_proto) { | 401 NextProto next_proto) { |
402 switch (next_proto) { | 402 switch (next_proto) { |
403 case kProtoHTTP2: | 403 case kProtoHTTP2: |
404 return CONNECTION_INFO_HTTP2; | 404 return CONNECTION_INFO_HTTP2; |
405 case kProtoQUIC1SPDY3: | 405 case kProtoQUIC1SPDY3: |
406 return CONNECTION_INFO_QUIC1_SPDY3; | 406 return CONNECTION_INFO_QUIC1_SPDY3; |
407 | 407 |
408 case kProtoUnknown: | 408 case kProtoUnknown: |
409 case kProtoHTTP11: | 409 case kProtoHTTP11: |
410 case kProtoNumberOfNextProtos: | |
davidben
2016/08/27 02:27:58
If you keep the count value (see later comment), i
Bence
2016/08/29 12:54:33
Changed to kProtoLast, moot.
| |
410 break; | 411 break; |
411 } | 412 } |
412 | 413 |
413 NOTREACHED(); | 414 NOTREACHED(); |
414 return CONNECTION_INFO_UNKNOWN; | 415 return CONNECTION_INFO_UNKNOWN; |
415 } | 416 } |
416 | 417 |
417 // static | 418 // static |
418 std::string HttpResponseInfo::ConnectionInfoToString( | 419 std::string HttpResponseInfo::ConnectionInfoToString( |
419 ConnectionInfo connection_info) { | 420 ConnectionInfo connection_info) { |
(...skipping 22 matching lines...) Expand all Loading... | |
442 case CONNECTION_INFO_HTTP1_0: | 443 case CONNECTION_INFO_HTTP1_0: |
443 return "http/1.0"; | 444 return "http/1.0"; |
444 case NUM_OF_CONNECTION_INFOS: | 445 case NUM_OF_CONNECTION_INFOS: |
445 break; | 446 break; |
446 } | 447 } |
447 NOTREACHED(); | 448 NOTREACHED(); |
448 return ""; | 449 return ""; |
449 } | 450 } |
450 | 451 |
451 } // namespace net | 452 } // namespace net |
OLD | NEW |