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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 }; | 122 }; |
123 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE | 123 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE |
124 MapFramerErrorToProtocolError(SpdyFramer::SpdyError error); | 124 MapFramerErrorToProtocolError(SpdyFramer::SpdyError error); |
125 Error NET_EXPORT_PRIVATE MapFramerErrorToNetError(SpdyFramer::SpdyError error); | 125 Error NET_EXPORT_PRIVATE MapFramerErrorToNetError(SpdyFramer::SpdyError error); |
126 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE | 126 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE |
127 MapRstStreamStatusToProtocolError(SpdyRstStreamStatus status); | 127 MapRstStreamStatusToProtocolError(SpdyRstStreamStatus status); |
128 SpdyGoAwayStatus NET_EXPORT_PRIVATE MapNetErrorToGoAwayStatus(Error err); | 128 SpdyGoAwayStatus NET_EXPORT_PRIVATE MapNetErrorToGoAwayStatus(Error err); |
129 | 129 |
130 // If these compile asserts fail then SpdyProtocolErrorDetails needs | 130 // If these compile asserts fail then SpdyProtocolErrorDetails needs |
131 // to be updated with new values, as do the mapping functions above. | 131 // to be updated with new values, as do the mapping functions above. |
132 COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR, | 132 static_assert(12 == SpdyFramer::LAST_ERROR, |
133 SpdyProtocolErrorDetails_SpdyErrors_mismatch); | 133 "SpdyProtocolErrorDetails / Spdy Errors mismatch"); |
134 COMPILE_ASSERT(17 == RST_STREAM_NUM_STATUS_CODES, | 134 static_assert(17 == RST_STREAM_NUM_STATUS_CODES, |
135 SpdyProtocolErrorDetails_RstStreamStatus_mismatch); | 135 "SpdyProtocolErrorDetails / RstStreamStatus mismatch"); |
136 | 136 |
137 // Splits pushed |headers| into request and response parts. Request headers are | 137 // Splits pushed |headers| into request and response parts. Request headers are |
138 // the headers specifying resource URL. | 138 // the headers specifying resource URL. |
139 void NET_EXPORT_PRIVATE | 139 void NET_EXPORT_PRIVATE |
140 SplitPushedHeadersToRequestAndResponse(const SpdyHeaderBlock& headers, | 140 SplitPushedHeadersToRequestAndResponse(const SpdyHeaderBlock& headers, |
141 SpdyMajorVersion protocol_version, | 141 SpdyMajorVersion protocol_version, |
142 SpdyHeaderBlock* request_headers, | 142 SpdyHeaderBlock* request_headers, |
143 SpdyHeaderBlock* response_headers); | 143 SpdyHeaderBlock* response_headers); |
144 | 144 |
145 // A helper class used to manage a request to create a stream. | 145 // A helper class used to manage a request to create a stream. |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 // Used for posting asynchronous IO tasks. We use this even though | 1175 // Used for posting asynchronous IO tasks. We use this even though |
1176 // SpdySession is refcounted because we don't need to keep the SpdySession | 1176 // SpdySession is refcounted because we don't need to keep the SpdySession |
1177 // alive if the last reference is within a RunnableMethod. Just revoke the | 1177 // alive if the last reference is within a RunnableMethod. Just revoke the |
1178 // method. | 1178 // method. |
1179 base::WeakPtrFactory<SpdySession> weak_factory_; | 1179 base::WeakPtrFactory<SpdySession> weak_factory_; |
1180 }; | 1180 }; |
1181 | 1181 |
1182 } // namespace net | 1182 } // namespace net |
1183 | 1183 |
1184 #endif // NET_SPDY_SPDY_SESSION_H_ | 1184 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |