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

Side by Side Diff: net/quic/quic_chromium_client_stream.cc

Issue 2107353003: QUIC - expand server push test coverage and fix recent regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: QUIC - expand server push test coverage and fix recent regression. Created 4 years, 5 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 | « net/quic/quic_chromium_client_stream.h ('k') | net/quic/quic_network_transaction_unittest.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 #include "net/quic/quic_chromium_client_stream.h" 5 #include "net/quic/quic_chromium_client_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 headers_len, &headers)) { 102 headers_len, &headers)) {
103 DLOG(WARNING) << "Invalid headers"; 103 DLOG(WARNING) << "Invalid headers";
104 Reset(QUIC_BAD_APPLICATION_PAYLOAD); 104 Reset(QUIC_BAD_APPLICATION_PAYLOAD);
105 return; 105 return;
106 } 106 }
107 MarkHeadersConsumed(headers_len); 107 MarkHeadersConsumed(headers_len);
108 108
109 session_->HandlePromised(id(), promised_id, headers); 109 session_->HandlePromised(id(), promised_id, headers);
110 } 110 }
111 111
112 void QuicChromiumClientStream::OnPromiseHeaderList(
113 QuicStreamId promised_id,
114 size_t frame_len,
115 const QuicHeaderList& header_list) {
116 SpdyHeaderBlock promise_headers;
117 int64_t content_length = -1;
118 if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length,
119 &promise_headers)) {
120 DLOG(ERROR) << "Failed to parse header list: " << header_list.DebugString();
121 ConsumeHeaderList();
122 Reset(QUIC_BAD_APPLICATION_PAYLOAD);
123 return;
124 }
125 ConsumeHeaderList();
126
127 session_->HandlePromised(id(), promised_id, promise_headers);
128 }
129
112 void QuicChromiumClientStream::OnDataAvailable() { 130 void QuicChromiumClientStream::OnDataAvailable() {
113 if (!FinishedReadingHeaders() || !headers_delivered_) { 131 if (!FinishedReadingHeaders() || !headers_delivered_) {
114 // Buffer the data in the sequencer until the headers have been read. 132 // Buffer the data in the sequencer until the headers have been read.
115 return; 133 return;
116 } 134 }
117 135
118 // The delegate will read the data via a posted task, and 136 // The delegate will read the data via a posted task, and
119 // will be able to, potentially, read all data which has queued up. 137 // will be able to, potentially, read all data which has queued up.
120 NotifyDelegateOfDataAvailableLater(); 138 NotifyDelegateOfDataAvailableLater();
121 } 139 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } else { 309 } else {
292 delegate_tasks_.push_back(closure); 310 delegate_tasks_.push_back(closure);
293 } 311 }
294 } 312 }
295 313
296 void QuicChromiumClientStream::DisableConnectionMigration() { 314 void QuicChromiumClientStream::DisableConnectionMigration() {
297 can_migrate_ = false; 315 can_migrate_ = false;
298 } 316 }
299 317
300 } // namespace net 318 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_stream.h ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698