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

Side by Side Diff: net/tools/quic/test_tools/server_thread.cc

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 years, 1 month 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/tools/quic/test_tools/server_thread.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tools/quic/test_tools/server_thread.h" 5 #include "net/tools/quic/test_tools/server_thread.h"
6 6
7 #include "net/quic/test_tools/crypto_test_utils.h" 7 #include "net/quic/test_tools/crypto_test_utils.h"
8 #include "net/tools/quic/quic_dispatcher.h" 8 #include "net/tools/quic/quic_dispatcher.h"
9 #include "net/tools/quic/test_tools/quic_server_peer.h" 9 #include "net/tools/quic/test_tools/quic_server_peer.h"
10 10
11 namespace net { 11 namespace net {
12 namespace test { 12 namespace test {
13 13
14 ServerThread::ServerThread(QuicServer* server, 14 ServerThread::ServerThread(QuicServer* server, const IPEndPoint& address)
15 const IPEndPoint& address,
16 bool strike_register_no_startup_period)
17 : SimpleThread("server_thread"), 15 : SimpleThread("server_thread"),
18 confirmed_(base::WaitableEvent::ResetPolicy::MANUAL, 16 confirmed_(base::WaitableEvent::ResetPolicy::MANUAL,
19 base::WaitableEvent::InitialState::NOT_SIGNALED), 17 base::WaitableEvent::InitialState::NOT_SIGNALED),
20 pause_(base::WaitableEvent::ResetPolicy::MANUAL, 18 pause_(base::WaitableEvent::ResetPolicy::MANUAL,
21 base::WaitableEvent::InitialState::NOT_SIGNALED), 19 base::WaitableEvent::InitialState::NOT_SIGNALED),
22 paused_(base::WaitableEvent::ResetPolicy::MANUAL, 20 paused_(base::WaitableEvent::ResetPolicy::MANUAL,
23 base::WaitableEvent::InitialState::NOT_SIGNALED), 21 base::WaitableEvent::InitialState::NOT_SIGNALED),
24 resume_(base::WaitableEvent::ResetPolicy::MANUAL, 22 resume_(base::WaitableEvent::ResetPolicy::MANUAL,
25 base::WaitableEvent::InitialState::NOT_SIGNALED), 23 base::WaitableEvent::InitialState::NOT_SIGNALED),
26 quit_(base::WaitableEvent::ResetPolicy::MANUAL, 24 quit_(base::WaitableEvent::ResetPolicy::MANUAL,
27 base::WaitableEvent::InitialState::NOT_SIGNALED), 25 base::WaitableEvent::InitialState::NOT_SIGNALED),
28 server_(server), 26 server_(server),
29 address_(address), 27 address_(address),
30 port_(0), 28 port_(0),
31 initialized_(false) { 29 initialized_(false) {}
32 if (strike_register_no_startup_period) {
33 server_->SetStrikeRegisterNoStartupPeriod();
34 }
35 }
36 30
37 ServerThread::~ServerThread() {} 31 ServerThread::~ServerThread() {}
38 32
39 void ServerThread::Initialize() { 33 void ServerThread::Initialize() {
40 if (initialized_) { 34 if (initialized_) {
41 return; 35 return;
42 } 36 }
43 37
44 server_->CreateUDPSocketAndListen(address_); 38 server_->CreateUDPSocketAndListen(address_);
45 39
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 actions.swap(scheduled_actions_); 121 actions.swap(scheduled_actions_);
128 } 122 }
129 while (!actions.empty()) { 123 while (!actions.empty()) {
130 actions.front()(); 124 actions.front()();
131 actions.pop_front(); 125 actions.pop_front();
132 } 126 }
133 } 127 }
134 128
135 } // namespace test 129 } // namespace test
136 } // namespace net 130 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/server_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698