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

Side by Side Diff: net/tools/quic/quic_spdy_client_stream.cc

Issue 1905073002: Quic will push urls in x-associate-content and link headers upon ResponseHeadersComplete(). Change … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119778209
Patch Set: Rebase Created 4 years, 8 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_spdy_stream.h ('k') | net/tools/quic/test_tools/quic_test_client.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/tools/quic/quic_spdy_client_stream.h" 5 #include "net/tools/quic/quic_spdy_client_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/quic/quic_alarm.h" 10 #include "net/quic/quic_alarm.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 decompressed_headers().length(), &content_length, 111 decompressed_headers().length(), &content_length,
112 &promise_headers)) { 112 &promise_headers)) {
113 DLOG(ERROR) << "Failed to parse promise headers: " 113 DLOG(ERROR) << "Failed to parse promise headers: "
114 << decompressed_headers(); 114 << decompressed_headers();
115 Reset(QUIC_BAD_APPLICATION_PAYLOAD); 115 Reset(QUIC_BAD_APPLICATION_PAYLOAD);
116 return; 116 return;
117 } 117 }
118 MarkHeadersConsumed(decompressed_headers().length()); 118 MarkHeadersConsumed(decompressed_headers().length());
119 119
120 session_->HandlePromised(id(), promised_id, promise_headers); 120 session_->HandlePromised(id(), promised_id, promise_headers);
121 if (visitor() != nullptr) {
122 visitor()->OnPromiseHeadersComplete(promised_id, frame_len);
123 }
121 } 124 }
122 125
123 void QuicSpdyClientStream::OnPromiseHeaderList( 126 void QuicSpdyClientStream::OnPromiseHeaderList(
124 QuicStreamId promised_id, 127 QuicStreamId promised_id,
125 size_t frame_len, 128 size_t frame_len,
126 const QuicHeaderList& header_list) { 129 const QuicHeaderList& header_list) {
127 header_bytes_read_ += frame_len; 130 header_bytes_read_ += frame_len;
128 int64_t content_length = -1; 131 int64_t content_length = -1;
129 SpdyHeaderBlock promise_headers; 132 SpdyHeaderBlock promise_headers;
130 if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length, 133 if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 bytes_sent += header_bytes_written_; 184 bytes_sent += header_bytes_written_;
182 185
183 if (!body.empty()) { 186 if (!body.empty()) {
184 WriteOrBufferData(body, fin, nullptr); 187 WriteOrBufferData(body, fin, nullptr);
185 } 188 }
186 189
187 return bytes_sent; 190 return bytes_sent;
188 } 191 }
189 192
190 } // namespace net 193 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_stream.h ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698