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

Side by Side Diff: net/quic/core/quic_packet_generator.cc

Issue 2611613003: Add quic_logging (Closed)
Patch Set: fix failed test? Created 3 years, 11 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/core/quic_packet_creator.cc ('k') | net/quic/core/quic_packets.h » ('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/core/quic_packet_generator.h" 5 #include "net/quic/core/quic_packet_generator.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 8
9 #include "base/logging.h"
10 #include "net/quic/core/quic_utils.h" 9 #include "net/quic/core/quic_utils.h"
11 #include "net/quic/platform/api/quic_bug_tracker.h" 10 #include "net/quic/platform/api/quic_bug_tracker.h"
11 #include "net/quic/platform/api/quic_logging.h"
12 12
13 using base::StringPiece; 13 using base::StringPiece;
14 14
15 namespace net { 15 namespace net {
16 16
17 QuicPacketGenerator::QuicPacketGenerator(QuicConnectionId connection_id, 17 QuicPacketGenerator::QuicPacketGenerator(QuicConnectionId connection_id,
18 QuicFramer* framer, 18 QuicFramer* framer,
19 QuicBufferAllocator* buffer_allocator, 19 QuicBufferAllocator* buffer_allocator,
20 DelegateInterface* delegate) 20 DelegateInterface* delegate)
21 : delegate_(delegate), 21 : delegate_(delegate),
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 (flush || CanSendWithNextPendingFrameAddition())) { 193 (flush || CanSendWithNextPendingFrameAddition())) {
194 bool first_frame = packet_creator_.CanSetMaxPacketLength(); 194 bool first_frame = packet_creator_.CanSetMaxPacketLength();
195 if (!AddNextPendingFrame() && first_frame) { 195 if (!AddNextPendingFrame() && first_frame) {
196 // A single frame cannot fit into the packet, tear down the connection. 196 // A single frame cannot fit into the packet, tear down the connection.
197 QUIC_BUG << "A single frame cannot fit into packet." 197 QUIC_BUG << "A single frame cannot fit into packet."
198 << " should_send_ack: " << should_send_ack_ 198 << " should_send_ack: " << should_send_ack_
199 << " should_send_stop_waiting: " << should_send_stop_waiting_ 199 << " should_send_stop_waiting: " << should_send_stop_waiting_
200 << " number of queued_control_frames: " 200 << " number of queued_control_frames: "
201 << queued_control_frames_.size(); 201 << queued_control_frames_.size();
202 if (!queued_control_frames_.empty()) { 202 if (!queued_control_frames_.empty()) {
203 VLOG(1) << queued_control_frames_[0]; 203 QUIC_LOG(INFO) << queued_control_frames_[0];
204 } 204 }
205 delegate_->OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET, 205 delegate_->OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET,
206 "Single frame cannot fit into a packet", 206 "Single frame cannot fit into a packet",
207 ConnectionCloseSource::FROM_SELF); 207 ConnectionCloseSource::FROM_SELF);
208 return; 208 return;
209 } 209 }
210 } 210 }
211 if (flush || !InBatchMode()) { 211 if (flush || !InBatchMode()) {
212 packet_creator_.Flush(); 212 packet_creator_.Flush();
213 } 213 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 void QuicPacketGenerator::SetCurrentPath( 332 void QuicPacketGenerator::SetCurrentPath(
333 QuicPathId path_id, 333 QuicPathId path_id,
334 QuicPacketNumber least_packet_awaited_by_peer, 334 QuicPacketNumber least_packet_awaited_by_peer,
335 QuicPacketCount max_packets_in_flight) { 335 QuicPacketCount max_packets_in_flight) {
336 packet_creator_.SetCurrentPath(path_id, least_packet_awaited_by_peer, 336 packet_creator_.SetCurrentPath(path_id, least_packet_awaited_by_peer,
337 max_packets_in_flight); 337 max_packets_in_flight);
338 } 338 }
339 339
340 } // namespace net 340 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_packet_creator.cc ('k') | net/quic/core/quic_packets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698