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

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

Issue 2865893002: Buffer initial response headers in QuicChromiumClientStream (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/quic_chromium_client_stream.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 (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 // NOTE: This code is not shared between Google and Chrome. 5 // NOTE: This code is not shared between Google and Chrome.
6 6
7 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_ 7 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_
8 #define NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_ 8 #define NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 using QuicSpdyStream::HasBufferedData; 119 using QuicSpdyStream::HasBufferedData;
120 using QuicStream::sequencer; 120 using QuicStream::sequencer;
121 121
122 private: 122 private:
123 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers, 123 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers,
124 size_t frame_len); 124 size_t frame_len);
125 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers, 125 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers,
126 size_t frame_len); 126 size_t frame_len);
127 void NotifyDelegateOfDataAvailableLater(); 127 void NotifyDelegateOfDataAvailableLater();
128 void NotifyDelegateOfDataAvailable(); 128 void NotifyDelegateOfDataAvailable();
129 void RunOrBuffer(base::Closure closure);
130 129
131 NetLogWithSource net_log_; 130 NetLogWithSource net_log_;
132 Delegate* delegate_; 131 Delegate* delegate_;
133 132
134 bool headers_delivered_; 133 bool headers_delivered_;
135 134
136 // True when initial headers have been sent. 135 // True when initial headers have been sent.
137 bool initial_headers_sent_; 136 bool initial_headers_sent_;
138 137
139 // Callback to be invoked when WriteStreamData or WritevStreamData completes 138 // Callback to be invoked when WriteStreamData or WritevStreamData completes
140 // asynchronously. 139 // asynchronously.
141 CompletionCallback write_callback_; 140 CompletionCallback write_callback_;
142 141
143 QuicClientSessionBase* session_; 142 QuicClientSessionBase* session_;
144 143
145 // Set to false if this stream to not be migrated during connection migration. 144 // Set to false if this stream to not be migrated during connection migration.
146 bool can_migrate_; 145 bool can_migrate_;
147 146
148 // Holds notifications generated before delegate_ is set. 147 // Stores the initial header if they arrive before the delegate.
149 std::deque<base::Closure> delegate_tasks_; 148 SpdyHeaderBlock initial_headers_;
149 // Length of the HEADERS frame containing initial headers.
150 size_t initial_headers_frame_len_;
150 151
151 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; 152 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_;
152 153
153 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); 154 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream);
154 }; 155 };
155 156
156 } // namespace net 157 } // namespace net
157 158
158 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_ 159 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/chromium/quic_chromium_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698