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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! Created 5 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') | remoting/protocol/quic_channel_factory.cc » ('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 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 tools { 12 namespace tools {
13 namespace test { 13 namespace test {
14 14
15 ServerThread::ServerThread(QuicServer* server, 15 ServerThread::ServerThread(QuicServer* server,
16 bool is_secure,
17 const IPEndPoint& address, 16 const IPEndPoint& address,
18 bool strike_register_no_startup_period) 17 bool strike_register_no_startup_period)
19 : SimpleThread("server_thread"), 18 : SimpleThread("server_thread"),
20 confirmed_(true, false), 19 confirmed_(true, false),
21 pause_(true, false), 20 pause_(true, false),
22 paused_(true, false), 21 paused_(true, false),
23 resume_(true, false), 22 resume_(true, false),
24 quit_(true, false), 23 quit_(true, false),
25 server_(server), 24 server_(server),
26 address_(address), 25 address_(address),
27 port_(0), 26 port_(0),
28 initialized_(false) { 27 initialized_(false) {
29 if (strike_register_no_startup_period) { 28 if (strike_register_no_startup_period) {
30 server_->SetStrikeRegisterNoStartupPeriod(); 29 server_->SetStrikeRegisterNoStartupPeriod();
31 } 30 }
32 if (is_secure) {
33 // TODO(rtenneti): replace this with ProofSourceForTesting() when Chromium
34 // has a working ProofSourceForTesting().
35 server_->SetProofSource(
36 net::test::CryptoTestUtils::FakeProofSourceForTesting());
37 }
38 } 31 }
39 32
40 ServerThread::~ServerThread() {} 33 ServerThread::~ServerThread() {}
41 34
42 void ServerThread::Initialize() { 35 void ServerThread::Initialize() {
43 if (initialized_) { 36 if (initialized_) {
44 return; 37 return;
45 } 38 }
46 39
47 server_->Listen(address_); 40 server_->Listen(address_);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 105 }
113 QuicSession* session = dispatcher->session_map().begin()->second; 106 QuicSession* session = dispatcher->session_map().begin()->second;
114 if (session->IsCryptoHandshakeConfirmed()) { 107 if (session->IsCryptoHandshakeConfirmed()) {
115 confirmed_.Signal(); 108 confirmed_.Signal();
116 } 109 }
117 } 110 }
118 111
119 } // namespace test 112 } // namespace test
120 } // namespace tools 113 } // namespace tools
121 } // namespace net 114 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/server_thread.h ('k') | remoting/protocol/quic_channel_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698