OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <list> | 10 #include <list> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Closes this session. This will close all active streams and mark | 165 // Closes this session. This will close all active streams and mark |
166 // the session as permanently closed. | 166 // the session as permanently closed. |
167 // |err| should not be OK; this function is intended to be called on | 167 // |err| should not be OK; this function is intended to be called on |
168 // error. | 168 // error. |
169 // |remove_from_pool| indicates whether to also remove the session from the | 169 // |remove_from_pool| indicates whether to also remove the session from the |
170 // session pool. | 170 // session pool. |
171 void CloseSessionOnError(net::Error err, bool remove_from_pool); | 171 void CloseSessionOnError(net::Error err, bool remove_from_pool); |
172 | 172 |
173 // Retrieves information on the current state of the SPDY session as a | 173 // Retrieves information on the current state of the SPDY session as a |
174 // Value. Caller takes possession of the returned value. | 174 // Value. Caller takes possession of the returned value. |
175 Value* GetInfoAsValue() const; | 175 base::Value* GetInfoAsValue() const; |
176 | 176 |
177 // Indicates whether the session is being reused after having successfully | 177 // Indicates whether the session is being reused after having successfully |
178 // used to send/receive data in the past. | 178 // used to send/receive data in the past. |
179 bool IsReused() const { | 179 bool IsReused() const { |
180 return frames_received_ > 0; | 180 return frames_received_ > 0; |
181 } | 181 } |
182 | 182 |
183 // Returns true if the underlying transport socket ever had any reads or | 183 // Returns true if the underlying transport socket ever had any reads or |
184 // writes. | 184 // writes. |
185 bool WasEverUsed() const { | 185 bool WasEverUsed() const { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 public: | 445 public: |
446 NetLogSpdySynParameter(const linked_ptr<spdy::SpdyHeaderBlock>& headers, | 446 NetLogSpdySynParameter(const linked_ptr<spdy::SpdyHeaderBlock>& headers, |
447 spdy::SpdyControlFlags flags, | 447 spdy::SpdyControlFlags flags, |
448 spdy::SpdyStreamId id, | 448 spdy::SpdyStreamId id, |
449 spdy::SpdyStreamId associated_stream); | 449 spdy::SpdyStreamId associated_stream); |
450 | 450 |
451 const linked_ptr<spdy::SpdyHeaderBlock>& GetHeaders() const { | 451 const linked_ptr<spdy::SpdyHeaderBlock>& GetHeaders() const { |
452 return headers_; | 452 return headers_; |
453 } | 453 } |
454 | 454 |
455 virtual Value* ToValue() const; | 455 virtual base::Value* ToValue() const; |
456 | 456 |
457 private: | 457 private: |
458 virtual ~NetLogSpdySynParameter(); | 458 virtual ~NetLogSpdySynParameter(); |
459 | 459 |
460 const linked_ptr<spdy::SpdyHeaderBlock> headers_; | 460 const linked_ptr<spdy::SpdyHeaderBlock> headers_; |
461 const spdy::SpdyControlFlags flags_; | 461 const spdy::SpdyControlFlags flags_; |
462 const spdy::SpdyStreamId id_; | 462 const spdy::SpdyStreamId id_; |
463 const spdy::SpdyStreamId associated_stream_; | 463 const spdy::SpdyStreamId associated_stream_; |
464 | 464 |
465 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySynParameter); | 465 DISALLOW_COPY_AND_ASSIGN(NetLogSpdySynParameter); |
466 }; | 466 }; |
467 | 467 |
468 } // namespace net | 468 } // namespace net |
469 | 469 |
470 #endif // NET_SPDY_SPDY_SESSION_H_ | 470 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |