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_SPDY_SPDY_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 STATUS_CODE_PROTOCOL_ERROR = 11, | 88 STATUS_CODE_PROTOCOL_ERROR = 11, |
89 STATUS_CODE_INVALID_STREAM = 12, | 89 STATUS_CODE_INVALID_STREAM = 12, |
90 STATUS_CODE_REFUSED_STREAM = 13, | 90 STATUS_CODE_REFUSED_STREAM = 13, |
91 STATUS_CODE_UNSUPPORTED_VERSION = 14, | 91 STATUS_CODE_UNSUPPORTED_VERSION = 14, |
92 STATUS_CODE_CANCEL = 15, | 92 STATUS_CODE_CANCEL = 15, |
93 STATUS_CODE_INTERNAL_ERROR = 16, | 93 STATUS_CODE_INTERNAL_ERROR = 16, |
94 STATUS_CODE_FLOW_CONTROL_ERROR = 17, | 94 STATUS_CODE_FLOW_CONTROL_ERROR = 17, |
95 STATUS_CODE_STREAM_IN_USE = 18, | 95 STATUS_CODE_STREAM_IN_USE = 18, |
96 STATUS_CODE_STREAM_ALREADY_CLOSED = 19, | 96 STATUS_CODE_STREAM_ALREADY_CLOSED = 19, |
97 STATUS_CODE_INVALID_CREDENTIALS = 20, | 97 STATUS_CODE_INVALID_CREDENTIALS = 20, |
98 STATUS_CODE_FRAME_TOO_LARGE = 21, | 98 STATUS_CODE_FRAME_SIZE_ERROR = 21, |
| 99 STATUS_CODE_SETTINGS_TIMEOUT = 32, |
| 100 STATUS_CODE_CONNECT_ERROR = 33, |
| 101 STATUS_CODE_ENHANCE_YOUR_CALM = 34, |
| 102 |
99 // SpdySession errors | 103 // SpdySession errors |
100 PROTOCOL_ERROR_UNEXPECTED_PING = 22, | 104 PROTOCOL_ERROR_UNEXPECTED_PING = 22, |
101 PROTOCOL_ERROR_RST_STREAM_FOR_NON_ACTIVE_STREAM = 23, | 105 PROTOCOL_ERROR_RST_STREAM_FOR_NON_ACTIVE_STREAM = 23, |
102 PROTOCOL_ERROR_SPDY_COMPRESSION_FAILURE = 24, | 106 PROTOCOL_ERROR_SPDY_COMPRESSION_FAILURE = 24, |
103 PROTOCOL_ERROR_REQUEST_FOR_SECURE_CONTENT_OVER_INSECURE_SESSION = 25, | 107 PROTOCOL_ERROR_REQUEST_FOR_SECURE_CONTENT_OVER_INSECURE_SESSION = 25, |
104 PROTOCOL_ERROR_SYN_REPLY_NOT_RECEIVED = 26, | 108 PROTOCOL_ERROR_SYN_REPLY_NOT_RECEIVED = 26, |
105 PROTOCOL_ERROR_INVALID_WINDOW_UPDATE_SIZE = 27, | 109 PROTOCOL_ERROR_INVALID_WINDOW_UPDATE_SIZE = 27, |
106 PROTOCOL_ERROR_RECEIVE_WINDOW_VIOLATION = 28, | 110 PROTOCOL_ERROR_RECEIVE_WINDOW_VIOLATION = 28, |
107 | 111 |
108 // Next free value. | 112 // Next free value. |
109 NUM_SPDY_PROTOCOL_ERROR_DETAILS = 32, | 113 NUM_SPDY_PROTOCOL_ERROR_DETAILS = 35, |
110 }; | 114 }; |
111 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapFramerErrorToProtocolError( | 115 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapFramerErrorToProtocolError( |
112 SpdyFramer::SpdyError); | 116 SpdyFramer::SpdyError); |
113 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapRstStreamStatusToProtocolError( | 117 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapRstStreamStatusToProtocolError( |
114 SpdyRstStreamStatus); | 118 SpdyRstStreamStatus); |
115 | 119 |
116 // If these compile asserts fail then SpdyProtocolErrorDetails needs | 120 // If these compile asserts fail then SpdyProtocolErrorDetails needs |
117 // to be updated with new values, as do the mapping functions above. | 121 // to be updated with new values, as do the mapping functions above. |
118 COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR, | 122 COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR, |
119 SpdyProtocolErrorDetails_SpdyErrors_mismatch); | 123 SpdyProtocolErrorDetails_SpdyErrors_mismatch); |
120 COMPILE_ASSERT(12 == RST_STREAM_NUM_STATUS_CODES, | 124 COMPILE_ASSERT(15 == RST_STREAM_NUM_STATUS_CODES, |
121 SpdyProtocolErrorDetails_RstStreamStatus_mismatch); | 125 SpdyProtocolErrorDetails_RstStreamStatus_mismatch); |
122 | 126 |
123 // A helper class used to manage a request to create a stream. | 127 // A helper class used to manage a request to create a stream. |
124 class NET_EXPORT_PRIVATE SpdyStreamRequest { | 128 class NET_EXPORT_PRIVATE SpdyStreamRequest { |
125 public: | 129 public: |
126 SpdyStreamRequest(); | 130 SpdyStreamRequest(); |
127 // Calls CancelRequest(). | 131 // Calls CancelRequest(). |
128 ~SpdyStreamRequest(); | 132 ~SpdyStreamRequest(); |
129 | 133 |
130 // Starts the request to create a stream. If OK is returned, then | 134 // Starts the request to create a stream. If OK is returned, then |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 // This SPDY proxy is allowed to push resources from origins that are | 1124 // This SPDY proxy is allowed to push resources from origins that are |
1121 // different from those of their associated streams. | 1125 // different from those of their associated streams. |
1122 HostPortPair trusted_spdy_proxy_; | 1126 HostPortPair trusted_spdy_proxy_; |
1123 | 1127 |
1124 TimeFunc time_func_; | 1128 TimeFunc time_func_; |
1125 }; | 1129 }; |
1126 | 1130 |
1127 } // namespace net | 1131 } // namespace net |
1128 | 1132 |
1129 #endif // NET_SPDY_SPDY_SESSION_H_ | 1133 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |