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

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

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_response_info.h ('k') | net/http/http_server_properties.h » ('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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (was_npn_negotiated) 324 if (was_npn_negotiated)
325 pickle->WriteString(npn_negotiated_protocol); 325 pickle->WriteString(npn_negotiated_protocol);
326 326
327 if (connection_info != CONNECTION_INFO_UNKNOWN) 327 if (connection_info != CONNECTION_INFO_UNKNOWN)
328 pickle->WriteInt(static_cast<int>(connection_info)); 328 pickle->WriteInt(static_cast<int>(connection_info));
329 } 329 }
330 330
331 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto( 331 HttpResponseInfo::ConnectionInfo HttpResponseInfo::ConnectionInfoFromNextProto(
332 NextProto next_proto) { 332 NextProto next_proto) {
333 switch (next_proto) { 333 switch (next_proto) {
334 case kProtoSPDY2: 334 case kProtoDeprecatedSPDY2:
335 return CONNECTION_INFO_SPDY2; 335 return CONNECTION_INFO_DEPRECATED_SPDY2;
336 case kProtoSPDY3: 336 case kProtoSPDY3:
337 case kProtoSPDY31: 337 case kProtoSPDY31:
338 return CONNECTION_INFO_SPDY3; 338 return CONNECTION_INFO_SPDY3;
339 case kProtoSPDY4a2: 339 case kProtoSPDY4a2:
340 return CONNECTION_INFO_SPDY4A2; 340 return CONNECTION_INFO_SPDY4A2;
341 case kProtoHTTP2Draft04: 341 case kProtoHTTP2Draft04:
342 return CONNECTION_INFO_HTTP2_DRAFT_04; 342 return CONNECTION_INFO_HTTP2_DRAFT_04;
343 case kProtoQUIC1SPDY3: 343 case kProtoQUIC1SPDY3:
344 return CONNECTION_INFO_QUIC1_SPDY3; 344 return CONNECTION_INFO_QUIC1_SPDY3;
345 345
346 case kProtoUnknown: 346 case kProtoUnknown:
347 case kProtoHTTP11: 347 case kProtoHTTP11:
348 break; 348 break;
349 } 349 }
350 350
351 NOTREACHED(); 351 NOTREACHED();
352 return CONNECTION_INFO_UNKNOWN; 352 return CONNECTION_INFO_UNKNOWN;
353 } 353 }
354 354
355 // static 355 // static
356 std::string HttpResponseInfo::ConnectionInfoToString( 356 std::string HttpResponseInfo::ConnectionInfoToString(
357 ConnectionInfo connection_info) { 357 ConnectionInfo connection_info) {
358 switch (connection_info) { 358 switch (connection_info) {
359 case CONNECTION_INFO_UNKNOWN: 359 case CONNECTION_INFO_UNKNOWN:
360 return "unknown"; 360 return "unknown";
361 case CONNECTION_INFO_HTTP1: 361 case CONNECTION_INFO_HTTP1:
362 return "http/1"; 362 return "http/1";
363 case CONNECTION_INFO_SPDY2: 363 case CONNECTION_INFO_DEPRECATED_SPDY2:
364 return "spdy/2"; 364 return "spdy/2";
365 case CONNECTION_INFO_SPDY3: 365 case CONNECTION_INFO_SPDY3:
366 return "spdy/3"; 366 return "spdy/3";
367 case CONNECTION_INFO_SPDY4A2: 367 case CONNECTION_INFO_SPDY4A2:
368 return "spdy/4a2"; 368 return "spdy/4a2";
369 case CONNECTION_INFO_HTTP2_DRAFT_04: 369 case CONNECTION_INFO_HTTP2_DRAFT_04:
370 return "HTTP-draft-04/2.0"; 370 return "HTTP-draft-04/2.0";
371 case CONNECTION_INFO_QUIC1_SPDY3: 371 case CONNECTION_INFO_QUIC1_SPDY3:
372 return "quic/1+spdy/3"; 372 return "quic/1+spdy/3";
373 case NUM_OF_CONNECTION_INFOS: 373 case NUM_OF_CONNECTION_INFOS:
374 break; 374 break;
375 } 375 }
376 NOTREACHED(); 376 NOTREACHED();
377 return ""; 377 return "";
378 } 378 }
379 379
380 } // namespace net 380 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_info.h ('k') | net/http/http_server_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698