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

Unified Diff: net/tools/quic/test_tools/server_thread.cc

Issue 331963002: Test tools for udp proxying. This involves a few refactors of test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/test_tools/server_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/server_thread.cc
diff --git a/net/tools/quic/test_tools/server_thread.cc b/net/tools/quic/test_tools/server_thread.cc
index e2b6506d17aae2931b1e2939b6017b021d348b78..337cc64cd082bef7ba0414ac9c796a7da346e32c 100644
--- a/net/tools/quic/test_tools/server_thread.cc
+++ b/net/tools/quic/test_tools/server_thread.cc
@@ -10,9 +10,8 @@ namespace net {
namespace tools {
namespace test {
-ServerThread::ServerThread(IPEndPoint address,
- const QuicConfig& config,
- const QuicVersionVector& supported_versions,
+ServerThread::ServerThread(QuicServer* server,
+ IPEndPoint address,
bool strike_register_no_startup_period)
: SimpleThread("server_thread"),
confirmed_(true, false),
@@ -20,12 +19,12 @@ ServerThread::ServerThread(IPEndPoint address,
paused_(true, false),
resume_(true, false),
quit_(true, false),
- server_(config, supported_versions),
+ server_(server),
address_(address),
port_(0),
initialized_(false) {
if (strike_register_no_startup_period) {
- server_.SetStrikeRegisterNoStartupPeriod();
+ server_->SetStrikeRegisterNoStartupPeriod();
}
}
@@ -36,10 +35,10 @@ void ServerThread::Initialize() {
return;
}
- server_.Listen(address_);
+ server_->Listen(address_);
port_lock_.Acquire();
- port_ = server_.port();
+ port_ = server_->port();
port_lock_.Release();
initialized_ = true;
@@ -55,11 +54,11 @@ void ServerThread::Run() {
paused_.Signal();
resume_.Wait();
}
- server_.WaitForEvents();
+ server_->WaitForEvents();
MaybeNotifyOfHandshakeConfirmation();
}
- server_.Shutdown();
+ server_->Shutdown();
}
int ServerThread::GetPort() {
« 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