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

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

Issue 1008293002: Provide a MockConnection constructor that takes connection_id, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_a_kBYTE_congestion_option_88328620
Patch Set: Created 5 years, 9 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 | « no previous file | net/quic/test_tools/quic_test_utils.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_dispatcher.h" 5 #include "net/quic/quic_dispatcher.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // packets. 278 // packets.
279 QuicVersion version = header.versions.front(); 279 QuicVersion version = header.versions.front();
280 time_wait_list_manager_->AddConnectionIdToTimeWait(connection_id, version, 280 time_wait_list_manager_->AddConnectionIdToTimeWait(connection_id, version,
281 nullptr); 281 nullptr);
282 DCHECK(time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id)); 282 DCHECK(time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id));
283 HandlePacketForTimeWait(header); 283 HandlePacketForTimeWait(header);
284 284
285 return nullptr; 285 return nullptr;
286 } 286 }
287 287
288 DVLOG(1) << "Created new session for " << connection_id; 288 DVLOG(1) << "Created new session for connection ID " << connection_id;
289 session_map_.insert(std::make_pair(connection_id, session)); 289 session_map_.insert(std::make_pair(connection_id, session));
290 290
291 return session; 291 return session;
292 } 292 }
293 293
294 void QuicDispatcher::OnUnauthenticatedHeader(const QuicPacketHeader& header) { 294 void QuicDispatcher::OnUnauthenticatedHeader(const QuicPacketHeader& header) {
295 DCHECK(time_wait_list_manager_->IsConnectionIdInTimeWait( 295 DCHECK(time_wait_list_manager_->IsConnectionIdInTimeWait(
296 header.public_header.connection_id)); 296 header.public_header.connection_id));
297 time_wait_list_manager_->ProcessPacket(current_server_address_, 297 time_wait_list_manager_->ProcessPacket(current_server_address_,
298 current_client_address_, 298 current_client_address_,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // be parsed correctly. 418 // be parsed correctly.
419 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( 419 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId(
420 header.connection_id)); 420 header.connection_id));
421 421
422 // Continue parsing the packet to extract the sequence number. Then 422 // Continue parsing the packet to extract the sequence number. Then
423 // send it to the time wait manager in OnUnathenticatedHeader. 423 // send it to the time wait manager in OnUnathenticatedHeader.
424 return true; 424 return true;
425 } 425 }
426 426
427 } // namespace net 427 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698