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

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

Issue 1032903002: Unify various QUIC server classes in net/quic and net/tools/quic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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_dispatcher.h ('k') | net/quic/quic_in_memory_cache.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"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "net/quic/quic_blocked_writer_interface.h" 12 #include "net/quic/quic_blocked_writer_interface.h"
13 #include "net/quic/quic_connection_helper.h" 13 #include "net/quic/quic_connection_helper.h"
14 #include "net/quic/quic_flags.h" 14 #include "net/quic/quic_flags.h"
15 #include "net/quic/quic_per_connection_packet_writer.h" 15 #include "net/quic/quic_per_connection_packet_writer.h"
16 #include "net/quic/quic_time_wait_list_manager.h"
17 #include "net/quic/quic_utils.h" 16 #include "net/quic/quic_utils.h"
18 17
19 namespace net { 18 namespace net {
20 19
21 using base::StringPiece; 20 using base::StringPiece;
22 using std::make_pair; 21 using std::make_pair;
23 using std::find; 22 using std::find;
23 using tools::QuicServerSession;
24 using tools::QuicTimeWaitListManager;
24 25
25 class DeleteSessionsAlarm : public QuicAlarm::Delegate { 26 class DeleteSessionsAlarm : public QuicAlarm::Delegate {
26 public: 27 public:
27 explicit DeleteSessionsAlarm(QuicDispatcher* dispatcher) 28 explicit DeleteSessionsAlarm(QuicDispatcher* dispatcher)
28 : dispatcher_(dispatcher) { 29 : dispatcher_(dispatcher) {
29 } 30 }
30 31
31 QuicTime OnAlarm() override { 32 QuicTime OnAlarm() override {
32 dispatcher_->DeleteSessions(); 33 dispatcher_->DeleteSessions();
33 return QuicTime::Zero(); 34 return QuicTime::Zero();
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // be parsed correctly. 419 // be parsed correctly.
419 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( 420 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId(
420 header.connection_id)); 421 header.connection_id));
421 422
422 // Continue parsing the packet to extract the sequence number. Then 423 // Continue parsing the packet to extract the sequence number. Then
423 // send it to the time wait manager in OnUnathenticatedHeader. 424 // send it to the time wait manager in OnUnathenticatedHeader.
424 return true; 425 return true;
425 } 426 }
426 427
427 } // namespace net 428 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_dispatcher.h ('k') | net/quic/quic_in_memory_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698