OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 5 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 SpdyResponseHeadersStatus OnResponseHeadersUpdated( | 63 SpdyResponseHeadersStatus OnResponseHeadersUpdated( |
64 const SpdyHeaderBlock& response_headers) override; | 64 const SpdyHeaderBlock& response_headers) override; |
65 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; | 65 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override; |
66 void OnDataSent() override; | 66 void OnDataSent() override; |
67 void OnTrailers(const SpdyHeaderBlock& trailers) override; | 67 void OnTrailers(const SpdyHeaderBlock& trailers) override; |
68 void OnClose(int status) override; | 68 void OnClose(int status) override; |
69 | 69 |
70 private: | 70 private: |
71 int SendRequestHeadersHelper(); | 71 int SendRequestHeadersHelper(); |
72 void OnStreamInitialized(int rv); | 72 void OnStreamInitialized(int rv); |
| 73 // Notifies delegate of an error. |
| 74 void NotifyError(int rv); |
| 75 void ResetStream(); |
73 void ScheduleBufferedRead(); | 76 void ScheduleBufferedRead(); |
74 void DoBufferedRead(); | 77 void DoBufferedRead(); |
75 bool ShouldWaitForMoreBufferedData() const; | 78 bool ShouldWaitForMoreBufferedData() const; |
76 | 79 |
77 const base::WeakPtr<SpdySession> spdy_session_; | 80 const base::WeakPtr<SpdySession> spdy_session_; |
78 const BidirectionalStreamRequestInfo* request_info_; | 81 const BidirectionalStreamRequestInfo* request_info_; |
79 BidirectionalStreamImpl::Delegate* delegate_; | 82 BidirectionalStreamImpl::Delegate* delegate_; |
80 std::unique_ptr<base::Timer> timer_; | 83 std::unique_ptr<base::Timer> timer_; |
81 SpdyStreamRequest stream_request_; | 84 SpdyStreamRequest stream_request_; |
82 base::WeakPtr<SpdyStream> stream_; | 85 base::WeakPtr<SpdyStream> stream_; |
(...skipping 23 matching lines...) Expand all Loading... |
106 scoped_refptr<IOBuffer> pending_combined_buffer_; | 109 scoped_refptr<IOBuffer> pending_combined_buffer_; |
107 | 110 |
108 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; | 111 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; |
109 | 112 |
110 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); | 113 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); |
111 }; | 114 }; |
112 | 115 |
113 } // namespace net | 116 } // namespace net |
114 | 117 |
115 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ | 118 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ |
OLD | NEW |