| 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 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 5 #ifndef NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 6 #define NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 #include "net/http/http_pipelined_host_capability.h" | 13 #include "net/http/http_pipelined_host_capability.h" |
| 14 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. | 14 #include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this. |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 | 17 |
| 18 enum AlternateProtocol { | 18 enum AlternateProtocol { |
| 19 NPN_SPDY_1 = 0, | 19 NPN_SPDY_1 = 0, |
| 20 NPN_SPDY_2, | 20 NPN_SPDY_2, |
| 21 NPN_SPDY_3, | 21 NPN_SPDY_3, |
| 22 NUM_ALTERNATE_PROTOCOLS, | 22 NUM_ALTERNATE_PROTOCOLS, |
| 23 ALTERNATE_PROTOCOL_BROKEN, // The alternate protocol is known to be broken. | 23 ALTERNATE_PROTOCOL_BROKEN, // The alternate protocol is known to be broken. |
| 24 UNINITIALIZED_ALTERNATE_PROTOCOL, | 24 UNINITIALIZED_ALTERNATE_PROTOCOL, |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 NET_EXPORT const char* AlternateProtocolToString(AlternateProtocol protocol); |
| 28 NET_EXPORT AlternateProtocol AlternateProtocolFromString( |
| 29 const std::string& protocol); |
| 30 |
| 27 struct NET_EXPORT PortAlternateProtocolPair { | 31 struct NET_EXPORT PortAlternateProtocolPair { |
| 28 bool Equals(const PortAlternateProtocolPair& other) const { | 32 bool Equals(const PortAlternateProtocolPair& other) const { |
| 29 return port == other.port && protocol == other.protocol; | 33 return port == other.port && protocol == other.protocol; |
| 30 } | 34 } |
| 31 | 35 |
| 32 std::string ToString() const; | 36 std::string ToString() const; |
| 33 | 37 |
| 34 uint16 port; | 38 uint16 port; |
| 35 AlternateProtocol protocol; | 39 AlternateProtocol protocol; |
| 36 }; | 40 }; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 116 |
| 113 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0; | 117 virtual PipelineCapabilityMap GetPipelineCapabilityMap() const = 0; |
| 114 | 118 |
| 115 private: | 119 private: |
| 116 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); | 120 DISALLOW_COPY_AND_ASSIGN(HttpServerProperties); |
| 117 }; | 121 }; |
| 118 | 122 |
| 119 } // namespace net | 123 } // namespace net |
| 120 | 124 |
| 121 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ | 125 #endif // NET_HTTP_HTTP_SERVER_PROPERTIES_H_ |
| OLD | NEW |