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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 RequestPriority priority_; | 175 RequestPriority priority_; |
176 BoundNetLog net_log_; | 176 BoundNetLog net_log_; |
177 CompletionCallback callback_; | 177 CompletionCallback callback_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(SpdyStreamRequest); | 179 DISALLOW_COPY_AND_ASSIGN(SpdyStreamRequest); |
180 }; | 180 }; |
181 | 181 |
182 class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, | 182 class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>, |
183 public BufferedSpdyFramerVisitorInterface, | 183 public BufferedSpdyFramerVisitorInterface, |
184 public SpdyFramerDebugVisitorInterface, | 184 public SpdyFramerDebugVisitorInterface, |
185 public LayeredPool { | 185 public HigherLayeredPool { |
186 public: | 186 public: |
187 // TODO(akalin): Use base::TickClock when it becomes available. | 187 // TODO(akalin): Use base::TickClock when it becomes available. |
188 typedef base::TimeTicks (*TimeFunc)(void); | 188 typedef base::TimeTicks (*TimeFunc)(void); |
189 | 189 |
190 // How we handle flow control (version-dependent). | 190 // How we handle flow control (version-dependent). |
191 enum FlowControlState { | 191 enum FlowControlState { |
192 FLOW_CONTROL_NONE, | 192 FLOW_CONTROL_NONE, |
193 FLOW_CONTROL_STREAM, | 193 FLOW_CONTROL_STREAM, |
194 FLOW_CONTROL_STREAM_AND_SESSION | 194 FLOW_CONTROL_STREAM_AND_SESSION |
195 }; | 195 }; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 } | 447 } |
448 | 448 |
449 size_t GetFrameMaximumSize() const { | 449 size_t GetFrameMaximumSize() const { |
450 return buffered_spdy_framer_->GetFrameMaximumSize(); | 450 return buffered_spdy_framer_->GetFrameMaximumSize(); |
451 } | 451 } |
452 | 452 |
453 size_t GetDataFrameMaximumPayload() const { | 453 size_t GetDataFrameMaximumPayload() const { |
454 return buffered_spdy_framer_->GetDataFrameMaximumPayload(); | 454 return buffered_spdy_framer_->GetDataFrameMaximumPayload(); |
455 } | 455 } |
456 | 456 |
457 // LayeredPool implementation: | 457 // HigherLayeredPool implementation: |
458 virtual bool CloseOneIdleConnection() OVERRIDE; | 458 virtual bool CloseOneIdleConnection() OVERRIDE; |
459 | 459 |
460 private: | 460 private: |
461 friend class base::RefCounted<SpdySession>; | 461 friend class base::RefCounted<SpdySession>; |
462 friend class SpdyStreamRequest; | 462 friend class SpdyStreamRequest; |
463 friend class SpdySessionTest; | 463 friend class SpdySessionTest; |
464 | 464 |
465 // Allow tests to access our innards for testing purposes. | 465 // Allow tests to access our innards for testing purposes. |
466 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClientPing); | 466 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClientPing); |
467 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, FailedPing); | 467 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, FailedPing); |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 // This SPDY proxy is allowed to push resources from origins that are | 1017 // This SPDY proxy is allowed to push resources from origins that are |
1018 // different from those of their associated streams. | 1018 // different from those of their associated streams. |
1019 HostPortPair trusted_spdy_proxy_; | 1019 HostPortPair trusted_spdy_proxy_; |
1020 | 1020 |
1021 TimeFunc time_func_; | 1021 TimeFunc time_func_; |
1022 }; | 1022 }; |
1023 | 1023 |
1024 } // namespace net | 1024 } // namespace net |
1025 | 1025 |
1026 #endif // NET_SPDY_SPDY_SESSION_H_ | 1026 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |