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

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

Issue 2580393003: Replace QuicAckListenerInterface* with scoped_refptr<QuicAckListenerInterface>. (Closed)
Patch Set: Created 4 years 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
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/chromium/quic_chromium_client_stream.h" 5 #include "net/quic/chromium/quic_chromium_client_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 QuicStream::OnCanWrite(); 116 QuicStream::OnCanWrite();
117 117
118 if (!HasBufferedData() && !callback_.is_null()) { 118 if (!HasBufferedData() && !callback_.is_null()) {
119 base::ResetAndReturn(&callback_).Run(OK); 119 base::ResetAndReturn(&callback_).Run(OK);
120 } 120 }
121 } 121 }
122 122
123 size_t QuicChromiumClientStream::WriteHeaders( 123 size_t QuicChromiumClientStream::WriteHeaders(
124 SpdyHeaderBlock header_block, 124 SpdyHeaderBlock header_block,
125 bool fin, 125 bool fin,
126 QuicAckListenerInterface* ack_notifier_delegate) { 126 const scoped_refptr<QuicAckListenerInterface>& ack_notifier_delegate) {
127 if (!session()->IsCryptoHandshakeConfirmed()) { 127 if (!session()->IsCryptoHandshakeConfirmed()) {
128 auto entry = header_block.find(":method"); 128 auto entry = header_block.find(":method");
129 DCHECK(entry != header_block.end()); 129 DCHECK(entry != header_block.end());
130 DCHECK_NE("POST", entry->second); 130 DCHECK_NE("POST", entry->second);
131 } 131 }
132 net_log_.AddEvent( 132 net_log_.AddEvent(
133 NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS, 133 NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
134 base::Bind(&QuicRequestNetLogCallback, id(), &header_block, 134 base::Bind(&QuicRequestNetLogCallback, id(), &header_block,
135 QuicSpdyStream::priority())); 135 QuicSpdyStream::priority()));
136 return QuicSpdyStream::WriteHeaders(std::move(header_block), fin, 136 return QuicSpdyStream::WriteHeaders(std::move(header_block), fin,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 void QuicChromiumClientStream::DisableConnectionMigration() { 285 void QuicChromiumClientStream::DisableConnectionMigration() {
286 can_migrate_ = false; 286 can_migrate_ = false;
287 } 287 }
288 288
289 bool QuicChromiumClientStream::IsFirstStream() { 289 bool QuicChromiumClientStream::IsFirstStream() {
290 return id() == kHeadersStreamId + 2; 290 return id() == kHeadersStreamId + 2;
291 } 291 }
292 292
293 } // namespace net 293 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream.h ('k') | net/quic/chromium/quic_chromium_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698