| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapRstStreamStatusToProtocolError( | 117 SpdyProtocolErrorDetails NET_EXPORT_PRIVATE MapRstStreamStatusToProtocolError( |
| 118 SpdyRstStreamStatus); | 118 SpdyRstStreamStatus); |
| 119 | 119 |
| 120 // If these compile asserts fail then SpdyProtocolErrorDetails needs | 120 // If these compile asserts fail then SpdyProtocolErrorDetails needs |
| 121 // 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. |
| 122 COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR, | 122 COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR, |
| 123 SpdyProtocolErrorDetails_SpdyErrors_mismatch); | 123 SpdyProtocolErrorDetails_SpdyErrors_mismatch); |
| 124 COMPILE_ASSERT(15 == RST_STREAM_NUM_STATUS_CODES, | 124 COMPILE_ASSERT(15 == RST_STREAM_NUM_STATUS_CODES, |
| 125 SpdyProtocolErrorDetails_RstStreamStatus_mismatch); | 125 SpdyProtocolErrorDetails_RstStreamStatus_mismatch); |
| 126 | 126 |
| 127 // Splits pushed |headers| into request and response parts. Request headers are |
| 128 // the headers specifying resource URL. |
| 129 void SplitPushedHeadersToRequestAndResponse(const SpdyHeaderBlock& headers, |
| 130 SpdyMajorVersion protocol_version, |
| 131 SpdyHeaderBlock* request_headers, |
| 132 SpdyHeaderBlock* response_headers); |
| 133 |
| 127 // A helper class used to manage a request to create a stream. | 134 // A helper class used to manage a request to create a stream. |
| 128 class NET_EXPORT_PRIVATE SpdyStreamRequest { | 135 class NET_EXPORT_PRIVATE SpdyStreamRequest { |
| 129 public: | 136 public: |
| 130 SpdyStreamRequest(); | 137 SpdyStreamRequest(); |
| 131 // Calls CancelRequest(). | 138 // Calls CancelRequest(). |
| 132 ~SpdyStreamRequest(); | 139 ~SpdyStreamRequest(); |
| 133 | 140 |
| 134 // Starts the request to create a stream. If OK is returned, then | 141 // Starts the request to create a stream. If OK is returned, then |
| 135 // ReleaseStream() may be called. If ERR_IO_PENDING is returned, | 142 // ReleaseStream() may be called. If ERR_IO_PENDING is returned, |
| 136 // then when the stream is created, |callback| will be called, at | 143 // then when the stream is created, |callback| will be called, at |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 // Used for posting asynchronous IO tasks. We use this even though | 1118 // Used for posting asynchronous IO tasks. We use this even though |
| 1112 // SpdySession is refcounted because we don't need to keep the SpdySession | 1119 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1113 // alive if the last reference is within a RunnableMethod. Just revoke the | 1120 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1114 // method. | 1121 // method. |
| 1115 base::WeakPtrFactory<SpdySession> weak_factory_; | 1122 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1116 }; | 1123 }; |
| 1117 | 1124 |
| 1118 } // namespace net | 1125 } // namespace net |
| 1119 | 1126 |
| 1120 #endif // NET_SPDY_SPDY_SESSION_H_ | 1127 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |