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

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

Issue 9618002: SPDY - integration of spdy/3 code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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_server_properties.h ('k') | net/http/http_server_properties_impl.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) 2011 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_server_properties.h" 5 #include "net/http/http_server_properties.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 const char kAlternateProtocolHeader[] = "Alternate-Protocol"; 12 const char kAlternateProtocolHeader[] = "Alternate-Protocol";
13 const char* const kAlternateProtocolStrings[] = { 13 const char* const kAlternateProtocolStrings[] = {
14 "npn-spdy/1", 14 "npn-spdy/1",
15 "npn-spdy/2", 15 "npn-spdy/2",
16 "npn-spdy/2.1", 16 "npn-spdy/2.1",
17 "npn-spdy/3",
17 }; 18 };
18 19
19 static const char* AlternateProtocolToString(AlternateProtocol protocol) { 20 static const char* AlternateProtocolToString(AlternateProtocol protocol) {
20 switch (protocol) { 21 switch (protocol) {
21 case NPN_SPDY_1: 22 case NPN_SPDY_1:
22 case NPN_SPDY_2: 23 case NPN_SPDY_2:
23 case NPN_SPDY_21: 24 case NPN_SPDY_21:
25 case NPN_SPDY_3:
24 return kAlternateProtocolStrings[protocol]; 26 return kAlternateProtocolStrings[protocol];
25 case ALTERNATE_PROTOCOL_BROKEN: 27 case ALTERNATE_PROTOCOL_BROKEN:
26 return "Broken"; 28 return "Broken";
27 case UNINITIALIZED_ALTERNATE_PROTOCOL: 29 case UNINITIALIZED_ALTERNATE_PROTOCOL:
28 return "Uninitialized"; 30 return "Uninitialized";
29 default: 31 default:
30 NOTREACHED(); 32 NOTREACHED();
31 return ""; 33 return "";
32 } 34 }
33 } 35 }
34 36
35 std::string PortAlternateProtocolPair::ToString() const { 37 std::string PortAlternateProtocolPair::ToString() const {
36 return base::StringPrintf("%d:%s", port, 38 return base::StringPrintf("%d:%s", port,
37 AlternateProtocolToString(protocol)); 39 AlternateProtocolToString(protocol));
38 } 40 }
39 41
40 } // namespace net 42 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698