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

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

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 | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_flags.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 "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 if (!HasBufferedData() && !callback_.is_null()) { 133 if (!HasBufferedData() && !callback_.is_null()) {
134 base::ResetAndReturn(&callback_).Run(OK); 134 base::ResetAndReturn(&callback_).Run(OK);
135 } 135 }
136 } 136 }
137 137
138 size_t QuicChromiumClientStream::WriteHeaders( 138 size_t QuicChromiumClientStream::WriteHeaders(
139 const SpdyHeaderBlock& header_block, 139 const SpdyHeaderBlock& header_block,
140 bool fin, 140 bool fin,
141 QuicAckListenerInterface* ack_notifier_delegate) { 141 QuicAckListenerInterface* ack_notifier_delegate) {
142 if (!session()->IsCryptoHandshakeConfirmed()) {
143 auto entry = header_block.find(":method");
144 DCHECK(entry != header_block.end());
145 DCHECK_NE("POST", entry->second);
146 }
142 net_log_.AddEvent( 147 net_log_.AddEvent(
143 NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS, 148 NetLog::TYPE_QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
144 base::Bind(&QuicRequestNetLogCallback, id(), &header_block, 149 base::Bind(&QuicRequestNetLogCallback, id(), &header_block,
145 QuicSpdyStream::priority())); 150 QuicSpdyStream::priority()));
146 return QuicSpdyStream::WriteHeaders(header_block, fin, ack_notifier_delegate); 151 return QuicSpdyStream::WriteHeaders(header_block, fin, ack_notifier_delegate);
147 } 152 }
148 153
149 SpdyPriority QuicChromiumClientStream::priority() const { 154 SpdyPriority QuicChromiumClientStream::priority() const {
150 if (delegate_ && delegate_->HasSendHeadersComplete()) { 155 if (delegate_ && delegate_->HasSendHeadersComplete()) {
151 return QuicSpdyStream::priority(); 156 return QuicSpdyStream::priority();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } else { 288 } else {
284 delegate_tasks_.push_back(closure); 289 delegate_tasks_.push_back(closure);
285 } 290 }
286 } 291 }
287 292
288 void QuicChromiumClientStream::DisableConnectionMigration() { 293 void QuicChromiumClientStream::DisableConnectionMigration() {
289 can_migrate_ = false; 294 can_migrate_ = false;
290 } 295 }
291 296
292 } // namespace net 297 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698