| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RESPONSE_INFO_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_ |
| 6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // NOTE: This is persisted to the cache, so make sure not to reorder | 30 // NOTE: This is persisted to the cache, so make sure not to reorder |
| 31 // these values. | 31 // these values. |
| 32 // | 32 // |
| 33 // TODO(akalin): Better yet, just use a string instead of an enum, | 33 // TODO(akalin): Better yet, just use a string instead of an enum, |
| 34 // like |npn_negotiated_protocol|. | 34 // like |npn_negotiated_protocol|. |
| 35 enum ConnectionInfo { | 35 enum ConnectionInfo { |
| 36 CONNECTION_INFO_UNKNOWN = 0, | 36 CONNECTION_INFO_UNKNOWN = 0, |
| 37 CONNECTION_INFO_HTTP1 = 1, | 37 CONNECTION_INFO_HTTP1 = 1, |
| 38 CONNECTION_INFO_DEPRECATED_SPDY2 = 2, | 38 CONNECTION_INFO_DEPRECATED_SPDY2 = 2, |
| 39 CONNECTION_INFO_SPDY3 = 3, | 39 CONNECTION_INFO_SPDY3 = 3, |
| 40 CONNECTION_INFO_SPDY4 = 4, | 40 // CONNECTION_INFO_HTTP2 = 4, // TODO(bnc): This will be HTTP/2. |
| 41 CONNECTION_INFO_QUIC1_SPDY3 = 5, | 41 CONNECTION_INFO_QUIC1_SPDY3 = 5, |
| 42 CONNECTION_INFO_HTTP2_14 = 6, // HTTP/2 draft-14. |
| 43 CONNECTION_INFO_HTTP2_15 = 7, // HTTP/2 draft-15. |
| 42 NUM_OF_CONNECTION_INFOS, | 44 NUM_OF_CONNECTION_INFOS, |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 HttpResponseInfo(); | 47 HttpResponseInfo(); |
| 46 HttpResponseInfo(const HttpResponseInfo& rhs); | 48 HttpResponseInfo(const HttpResponseInfo& rhs); |
| 47 ~HttpResponseInfo(); | 49 ~HttpResponseInfo(); |
| 48 HttpResponseInfo& operator=(const HttpResponseInfo& rhs); | 50 HttpResponseInfo& operator=(const HttpResponseInfo& rhs); |
| 49 // Even though we could get away with the copy ctor and default operator=, | 51 // Even though we could get away with the copy ctor and default operator=, |
| 50 // that would prevent us from doing a bunch of forward declaration. | 52 // that would prevent us from doing a bunch of forward declaration. |
| 51 | 53 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 scoped_refptr<IOBufferWithSize> metadata; | 141 scoped_refptr<IOBufferWithSize> metadata; |
| 140 | 142 |
| 141 static ConnectionInfo ConnectionInfoFromNextProto(NextProto next_proto); | 143 static ConnectionInfo ConnectionInfoFromNextProto(NextProto next_proto); |
| 142 | 144 |
| 143 static std::string ConnectionInfoToString(ConnectionInfo connection_info); | 145 static std::string ConnectionInfoToString(ConnectionInfo connection_info); |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 } // namespace net | 148 } // namespace net |
| 147 | 149 |
| 148 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ | 150 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ |
| OLD | NEW |