| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 604 |
| 605 // Returns the next pending stream request to process, or NULL if | 605 // Returns the next pending stream request to process, or NULL if |
| 606 // there is none. | 606 // there is none. |
| 607 base::WeakPtr<SpdyStreamRequest> GetNextPendingStreamRequest(); | 607 base::WeakPtr<SpdyStreamRequest> GetNextPendingStreamRequest(); |
| 608 | 608 |
| 609 // Called when there is room to create more streams (e.g., a stream | 609 // Called when there is room to create more streams (e.g., a stream |
| 610 // was closed). Processes as many pending stream requests as | 610 // was closed). Processes as many pending stream requests as |
| 611 // possible. | 611 // possible. |
| 612 void ProcessPendingStreamRequests(); | 612 void ProcessPendingStreamRequests(); |
| 613 | 613 |
| 614 bool TryCreatePushStream(SpdyStreamId stream_id, |
| 615 SpdyStreamId associated_stream_id, |
| 616 SpdyPriority priority, |
| 617 const SpdyHeaderBlock& headers); |
| 618 |
| 614 // Close the stream pointed to by the given iterator. Note that that | 619 // Close the stream pointed to by the given iterator. Note that that |
| 615 // stream may hold the last reference to the session. | 620 // stream may hold the last reference to the session. |
| 616 void CloseActiveStreamIterator(ActiveStreamMap::iterator it, int status); | 621 void CloseActiveStreamIterator(ActiveStreamMap::iterator it, int status); |
| 617 | 622 |
| 618 // Close the stream pointed to by the given iterator. Note that that | 623 // Close the stream pointed to by the given iterator. Note that that |
| 619 // stream may hold the last reference to the session. | 624 // stream may hold the last reference to the session. |
| 620 void CloseCreatedStreamIterator(CreatedStreamSet::iterator it, int status); | 625 void CloseCreatedStreamIterator(CreatedStreamSet::iterator it, int status); |
| 621 | 626 |
| 622 // Calls EnqueueResetStreamFrame() and then | 627 // Calls EnqueueResetStreamFrame() and then |
| 623 // CloseActiveStreamIterator(). | 628 // CloseActiveStreamIterator(). |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 // Used for posting asynchronous IO tasks. We use this even though | 1132 // Used for posting asynchronous IO tasks. We use this even though |
| 1128 // SpdySession is refcounted because we don't need to keep the SpdySession | 1133 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1129 // alive if the last reference is within a RunnableMethod. Just revoke the | 1134 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1130 // method. | 1135 // method. |
| 1131 base::WeakPtrFactory<SpdySession> weak_factory_; | 1136 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1132 }; | 1137 }; |
| 1133 | 1138 |
| 1134 } // namespace net | 1139 } // namespace net |
| 1135 | 1140 |
| 1136 #endif // NET_SPDY_SPDY_SESSION_H_ | 1141 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |