Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: net/http/http_response_info.cc

Issue 2140253002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_response_info.h ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 NOTREACHED(); 412 NOTREACHED();
413 return CONNECTION_INFO_UNKNOWN; 413 return CONNECTION_INFO_UNKNOWN;
414 } 414 }
415 415
416 // static 416 // static
417 std::string HttpResponseInfo::ConnectionInfoToString( 417 std::string HttpResponseInfo::ConnectionInfoToString(
418 ConnectionInfo connection_info) { 418 ConnectionInfo connection_info) {
419 switch (connection_info) { 419 switch (connection_info) {
420 case CONNECTION_INFO_UNKNOWN: 420 case CONNECTION_INFO_UNKNOWN:
421 return "unknown"; 421 return "unknown";
422 case CONNECTION_INFO_HTTP1: 422 case CONNECTION_INFO_HTTP1_1:
423 return "http/1"; 423 return "http/1.1";
424 case CONNECTION_INFO_DEPRECATED_SPDY2: 424 case CONNECTION_INFO_DEPRECATED_SPDY2:
425 NOTREACHED(); 425 NOTREACHED();
426 return ""; 426 return "";
427 case CONNECTION_INFO_SPDY3: 427 case CONNECTION_INFO_SPDY3:
428 return "spdy/3"; 428 return "spdy/3";
429 // Since ConnectionInfo is persisted to disk, deprecated values have to be 429 // Since ConnectionInfo is persisted to disk, deprecated values have to be
430 // handled. Note that h2-14 and h2-15 are essentially wire compatible with 430 // handled. Note that h2-14 and h2-15 are essentially wire compatible with
431 // h2. 431 // h2.
432 // Intentional fallthrough. 432 // Intentional fallthrough.
433 case CONNECTION_INFO_HTTP2_14: 433 case CONNECTION_INFO_HTTP2_14:
434 case CONNECTION_INFO_HTTP2_15: 434 case CONNECTION_INFO_HTTP2_15:
435 case CONNECTION_INFO_HTTP2: 435 case CONNECTION_INFO_HTTP2:
436 return "h2"; 436 return "h2";
437 case CONNECTION_INFO_QUIC1_SPDY3: 437 case CONNECTION_INFO_QUIC1_SPDY3:
438 return "quic/1+spdy/3"; 438 return "quic/1+spdy/3";
439 case CONNECTION_INFO_HTTP0_9:
440 return "http/0.9";
441 case CONNECTION_INFO_HTTP1_0:
442 return "http/1.0";
439 case NUM_OF_CONNECTION_INFOS: 443 case NUM_OF_CONNECTION_INFOS:
440 break; 444 break;
441 } 445 }
442 NOTREACHED(); 446 NOTREACHED();
443 return ""; 447 return "";
444 } 448 }
445 449
446 } // namespace net 450 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_info.h ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698