Chromium Code Reviews| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 390 // STATE_GOING_AWAY. After this function, DcheckGoingAway() will | 390 // STATE_GOING_AWAY. After this function, DcheckGoingAway() will |
| 391 // pass. May be called multiple times. | 391 // pass. May be called multiple times. |
| 392 void StartGoingAway(SpdyStreamId last_good_stream_id, Error status); | 392 void StartGoingAway(SpdyStreamId last_good_stream_id, Error status); |
| 393 | 393 |
| 394 // Must be called only when going away (i.e., DcheckGoingAway() | 394 // Must be called only when going away (i.e., DcheckGoingAway() |
| 395 // passes). If there are no more active streams and the session | 395 // passes). If there are no more active streams and the session |
| 396 // isn't closed yet, close it. | 396 // isn't closed yet, close it. |
| 397 void MaybeFinishGoingAway(); | 397 void MaybeFinishGoingAway(); |
| 398 | 398 |
| 399 // Retrieves information on the current state of the SPDY session as a | 399 // Retrieves information on the current state of the SPDY session as a |
| 400 // Value. Caller takes possession of the returned value. | 400 // Value. Caller takes possession of the returned value. |
|
eroman
2015/05/25 17:50:46
Remove comment on ownership
payal.pandey
2015/05/26 06:07:35
Done.
| |
| 401 base::Value* GetInfoAsValue() const; | 401 scoped_ptr<base::Value> GetInfoAsValue() const; |
| 402 | 402 |
| 403 // Indicates whether the session is being reused after having successfully | 403 // Indicates whether the session is being reused after having successfully |
| 404 // used to send/receive data in the past or if the underlying socket was idle | 404 // used to send/receive data in the past or if the underlying socket was idle |
| 405 // before being used for a SPDY session. | 405 // before being used for a SPDY session. |
| 406 bool IsReused() const; | 406 bool IsReused() const; |
| 407 | 407 |
| 408 // Returns true if the underlying transport socket ever had any reads or | 408 // Returns true if the underlying transport socket ever had any reads or |
| 409 // writes. | 409 // writes. |
| 410 bool WasEverUsed() const { | 410 bool WasEverUsed() const { |
| 411 return connection_->socket()->WasEverUsed(); | 411 return connection_->socket()->WasEverUsed(); |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1183 // Used for posting asynchronous IO tasks. We use this even though | 1183 // Used for posting asynchronous IO tasks. We use this even though |
| 1184 // SpdySession is refcounted because we don't need to keep the SpdySession | 1184 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1185 // alive if the last reference is within a RunnableMethod. Just revoke the | 1185 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1186 // method. | 1186 // method. |
| 1187 base::WeakPtrFactory<SpdySession> weak_factory_; | 1187 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1188 }; | 1188 }; |
| 1189 | 1189 |
| 1190 } // namespace net | 1190 } // namespace net |
| 1191 | 1191 |
| 1192 #endif // NET_SPDY_SPDY_SESSION_H_ | 1192 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |