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

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

Issue 2077683002: Move the logic for delaying 0-RTT QUIC POST from the QuicStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@QuicHttpStream
Patch Set: tweak Created 4 years, 6 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/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_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 5 #ifndef NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // QuicChromiumClientSession::Observer implementation: 68 // QuicChromiumClientSession::Observer implementation:
69 void OnCryptoHandshakeConfirmed() override; 69 void OnCryptoHandshakeConfirmed() override;
70 void OnSessionClosed(int error, bool port_migration_detected) override; 70 void OnSessionClosed(int error, bool port_migration_detected) override;
71 71
72 void OnStreamReady(int rv); 72 void OnStreamReady(int rv);
73 void OnSendDataComplete(int rv); 73 void OnSendDataComplete(int rv);
74 void OnReadDataComplete(int rv); 74 void OnReadDataComplete(int rv);
75 75
76 // Notifies the delegate of an error. 76 // Notifies the delegate of an error.
77 void NotifyError(int error); 77 void NotifyError(int error);
78 // Notifies the delegate that the stream is ready.
79 void NotifyStreamReady();
78 // Resets the stream and ensures that |delegate_| won't be called back. 80 // Resets the stream and ensures that |delegate_| won't be called back.
79 void ResetStream(); 81 void ResetStream();
80 82
81 base::WeakPtr<QuicChromiumClientSession> session_; 83 base::WeakPtr<QuicChromiumClientSession> session_;
82 bool was_handshake_confirmed_; // True if the crypto handshake succeeded. 84 bool was_handshake_confirmed_; // True if the crypto handshake succeeded.
83 QuicChromiumClientSession::StreamRequest stream_request_; 85 QuicChromiumClientSession::StreamRequest stream_request_;
84 QuicChromiumClientStream* stream_; // Non-owning. 86 QuicChromiumClientStream* stream_; // Non-owning.
85 87
86 const BidirectionalStreamRequestInfo* request_info_; 88 const BidirectionalStreamRequestInfo* request_info_;
87 BidirectionalStreamImpl::Delegate* delegate_; 89 BidirectionalStreamImpl::Delegate* delegate_;
(...skipping 22 matching lines...) Expand all
110 bool has_sent_headers_; 112 bool has_sent_headers_;
111 // Indicates whether initial headers have been received. 113 // Indicates whether initial headers have been received.
112 bool has_received_headers_; 114 bool has_received_headers_;
113 115
114 // Whether to automatically send request headers when stream is negotiated. 116 // Whether to automatically send request headers when stream is negotiated.
115 // If false, headers will not be sent until SendRequestHeaders() is called or 117 // If false, headers will not be sent until SendRequestHeaders() is called or
116 // until next SendData/SendvData, during which QUIC will try to combine header 118 // until next SendData/SendvData, during which QUIC will try to combine header
117 // frame with data frame in the same packet if possible. 119 // frame with data frame in the same packet if possible.
118 bool send_request_headers_automatically_; 120 bool send_request_headers_automatically_;
119 121
122 // True of this stream is waiting for the QUIC handshake to be confirmed
123 // before sending headers.
124 bool waiting_for_confirmation_;
125
120 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; 126 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;
121 127
122 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); 128 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl);
123 }; 129 };
124 130
125 } // namespace net 131 } // namespace net
126 132
127 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 133 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/bidirectional_stream_quic_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698