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

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

Issue 2030663002: Migrate WaitableEvent to enum-based constructor in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 6 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/proxy/proxy_resolver_v8_tracing.cc ('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,
15 const IPEndPoint& address, 15 const IPEndPoint& address,
16 bool strike_register_no_startup_period) 16 bool strike_register_no_startup_period)
17 : SimpleThread("server_thread"), 17 : SimpleThread("server_thread"),
18 confirmed_(true, false), 18 confirmed_(base::WaitableEvent::ResetPolicy::MANUAL,
19 pause_(true, false), 19 base::WaitableEvent::InitialState::NOT_SIGNALED),
20 paused_(true, false), 20 pause_(base::WaitableEvent::ResetPolicy::MANUAL,
21 resume_(true, false), 21 base::WaitableEvent::InitialState::NOT_SIGNALED),
22 quit_(true, false), 22 paused_(base::WaitableEvent::ResetPolicy::MANUAL,
23 base::WaitableEvent::InitialState::NOT_SIGNALED),
24 resume_(base::WaitableEvent::ResetPolicy::MANUAL,
25 base::WaitableEvent::InitialState::NOT_SIGNALED),
26 quit_(base::WaitableEvent::ResetPolicy::MANUAL,
27 base::WaitableEvent::InitialState::NOT_SIGNALED),
23 server_(server), 28 server_(server),
24 address_(address), 29 address_(address),
25 port_(0), 30 port_(0),
26 initialized_(false) { 31 initialized_(false) {
27 if (strike_register_no_startup_period) { 32 if (strike_register_no_startup_period) {
28 server_->SetStrikeRegisterNoStartupPeriod(); 33 server_->SetStrikeRegisterNoStartupPeriod();
29 } 34 }
30 } 35 }
31 36
32 ServerThread::~ServerThread() {} 37 ServerThread::~ServerThread() {}
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return; 108 return;
104 } 109 }
105 QuicSession* session = dispatcher->session_map().begin()->second; 110 QuicSession* session = dispatcher->session_map().begin()->second;
106 if (session->IsCryptoHandshakeConfirmed()) { 111 if (session->IsCryptoHandshakeConfirmed()) {
107 confirmed_.Signal(); 112 confirmed_.Signal();
108 } 113 }
109 } 114 }
110 115
111 } // namespace test 116 } // namespace test
112 } // namespace net 117 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_v8_tracing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698