| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 bool VerifyDomainAuthentication(const std::string& domain); | 365 bool VerifyDomainAuthentication(const std::string& domain); |
| 366 | 366 |
| 367 // Pushes the given producer into the write queue for | 367 // Pushes the given producer into the write queue for |
| 368 // |stream|. |stream| is guaranteed to be activated before the | 368 // |stream|. |stream| is guaranteed to be activated before the |
| 369 // producer is used to produce its frame. | 369 // producer is used to produce its frame. |
| 370 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream, | 370 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream, |
| 371 SpdyFrameType frame_type, | 371 SpdyFrameType frame_type, |
| 372 std::unique_ptr<SpdyBufferProducer> producer); | 372 std::unique_ptr<SpdyBufferProducer> producer); |
| 373 | 373 |
| 374 // Creates and returns a SYN frame for |stream_id|. | 374 // Creates and returns a SYN frame for |stream_id|. |
| 375 std::unique_ptr<SpdySerializedFrame> CreateSynStream( | 375 std::unique_ptr<SpdySerializedFrame> CreateSynStream(SpdyStreamId stream_id, |
| 376 SpdyStreamId stream_id, | 376 RequestPriority priority, |
| 377 RequestPriority priority, | 377 SpdyControlFlags flags, |
| 378 SpdyControlFlags flags, | 378 SpdyHeaderBlock headers); |
| 379 const SpdyHeaderBlock& headers); | |
| 380 | 379 |
| 381 // Creates and returns a SpdyBuffer holding a data frame with the | 380 // Creates and returns a SpdyBuffer holding a data frame with the |
| 382 // given data. May return NULL if stalled by flow control. | 381 // given data. May return NULL if stalled by flow control. |
| 383 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id, | 382 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id, |
| 384 IOBuffer* data, | 383 IOBuffer* data, |
| 385 int len, | 384 int len, |
| 386 SpdyDataFlags flags); | 385 SpdyDataFlags flags); |
| 387 | 386 |
| 388 // Close the stream with the given ID, which must exist and be | 387 // Close the stream with the given ID, which must exist and be |
| 389 // active. Note that that stream may hold the last reference to the | 388 // active. Note that that stream may hold the last reference to the |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 // Used for posting asynchronous IO tasks. We use this even though | 1235 // Used for posting asynchronous IO tasks. We use this even though |
| 1237 // SpdySession is refcounted because we don't need to keep the SpdySession | 1236 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1238 // alive if the last reference is within a RunnableMethod. Just revoke the | 1237 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1239 // method. | 1238 // method. |
| 1240 base::WeakPtrFactory<SpdySession> weak_factory_; | 1239 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1241 }; | 1240 }; |
| 1242 | 1241 |
| 1243 } // namespace net | 1242 } // namespace net |
| 1244 | 1243 |
| 1245 #endif // NET_SPDY_SPDY_SESSION_H_ | 1244 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |