Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Side by Side Diff: net/quic/chromium/bidirectional_stream_quic_impl.h

Issue 2867673002: Split QuicChromiumClientStreamDelegate::OnHeadersAvailable into (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/chromium/bidirectional_stream_quic_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 5 #ifndef NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
6 #define NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 6 #define NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, 51 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
52 const std::vector<int>& lengths, 52 const std::vector<int>& lengths,
53 bool end_stream) override; 53 bool end_stream) override;
54 NextProto GetProtocol() const override; 54 NextProto GetProtocol() const override;
55 int64_t GetTotalReceivedBytes() const override; 55 int64_t GetTotalReceivedBytes() const override;
56 int64_t GetTotalSentBytes() const override; 56 int64_t GetTotalSentBytes() const override;
57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
58 58
59 private: 59 private:
60 // QuicChromiumClientStream::Delegate implementation: 60 // QuicChromiumClientStream::Delegate implementation:
61 void OnHeadersAvailable(const SpdyHeaderBlock& headers, 61 void OnInitialHeadersAvailable(const SpdyHeaderBlock& headers,
62 size_t frame_len) override; 62 size_t frame_len) override;
63 void OnDataAvailable() override; 63 void OnDataAvailable() override;
64 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers,
65 size_t frame_len) override;
64 void OnClose() override; 66 void OnClose() override;
65 void OnError(int error) override; 67 void OnError(int error) override;
66 68
67 void OnStreamReady(int rv); 69 void OnStreamReady(int rv);
68 void OnSendDataComplete(int rv); 70 void OnSendDataComplete(int rv);
69 void OnReadDataComplete(int rv); 71 void OnReadDataComplete(int rv);
70 72
71 // Notifies the delegate of an error. 73 // Notifies the delegate of an error.
72 void NotifyError(int error); 74 void NotifyError(int error);
73 // Notifies the delegate that the stream is ready. 75 // Notifies the delegate that the stream is ready.
(...skipping 30 matching lines...) Expand all
104 int64_t closed_stream_received_bytes_; 106 int64_t closed_stream_received_bytes_;
105 // After |stream_| has been closed, this keeps track of the total number of 107 // After |stream_| has been closed, this keeps track of the total number of
106 // bytes sent over the network for |stream_| while it was open. 108 // bytes sent over the network for |stream_| while it was open.
107 int64_t closed_stream_sent_bytes_; 109 int64_t closed_stream_sent_bytes_;
108 // True if the stream is the first stream negotiated on the session. Set when 110 // True if the stream is the first stream negotiated on the session. Set when
109 // the stream was closed. If |stream_| is failed to be created, this takes on 111 // the stream was closed. If |stream_| is failed to be created, this takes on
110 // the default value of false. 112 // the default value of false.
111 bool closed_is_first_stream_; 113 bool closed_is_first_stream_;
112 // Indicates whether initial headers have been sent. 114 // Indicates whether initial headers have been sent.
113 bool has_sent_headers_; 115 bool has_sent_headers_;
114 // Indicates whether initial headers have been received.
115 bool has_received_headers_;
116 116
117 // Whether to automatically send request headers when stream is negotiated. 117 // Whether to automatically send request headers when stream is negotiated.
118 // If false, headers will not be sent until SendRequestHeaders() is called or 118 // If false, headers will not be sent until SendRequestHeaders() is called or
119 // until next SendData/SendvData, during which QUIC will try to combine header 119 // until next SendData/SendvData, during which QUIC will try to combine header
120 // frame with data frame in the same packet if possible. 120 // frame with data frame in the same packet if possible.
121 bool send_request_headers_automatically_; 121 bool send_request_headers_automatically_;
122 122
123 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; 123 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); 125 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl);
126 }; 126 };
127 127
128 } // namespace net 128 } // namespace net
129 129
130 #endif // NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 130 #endif // NET_QUIC_CHROMIUM_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/bidirectional_stream_quic_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698