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

Unified Diff: net/tools/testserver/run_testserver.cc

Issue 10878003: Refactoring for merging WebSocket test server to net::TestServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5 Created 8 years, 4 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
Index: net/tools/testserver/run_testserver.cc
diff --git a/net/tools/testserver/run_testserver.cc b/net/tools/testserver/run_testserver.cc
index f1e436228fd38e088e6318a54add065c0b10dad9..c02d4d6e18290ee6ea016f4e8998fba16db6215e 100644
--- a/net/tools/testserver/run_testserver.cc
+++ b/net/tools/testserver/run_testserver.cc
@@ -112,18 +112,18 @@ int main(int argc, const char* argv[]) {
return RunSyncTest() ? 0 : -1;
}
- net::TestServer::HTTPSOptions https_options;
+ net::TestServer::SSLOptions ssl_options;
if (command_line->HasSwitch("https-cert")) {
server_type = net::TestServer::TYPE_HTTPS;
std::string cert_option = command_line->GetSwitchValueASCII("https-cert");
if (cert_option == "ok") {
- https_options.server_certificate = net::TestServer::HTTPSOptions::CERT_OK;
+ ssl_options.server_certificate = net::TestServer::SSLOptions::CERT_OK;
} else if (cert_option == "mismatched-name") {
- https_options.server_certificate =
- net::TestServer::HTTPSOptions::CERT_MISMATCHED_NAME;
+ ssl_options.server_certificate =
+ net::TestServer::SSLOptions::CERT_MISMATCHED_NAME;
} else if (cert_option == "expired") {
- https_options.server_certificate =
- net::TestServer::HTTPSOptions::CERT_EXPIRED;
+ ssl_options.server_certificate =
+ net::TestServer::SSLOptions::CERT_EXPIRED;
} else {
printf("Error: --https-cert has invalid value %s\n", cert_option.c_str());
PrintUsage();
@@ -141,7 +141,9 @@ int main(int argc, const char* argv[]) {
scoped_ptr<net::TestServer> test_server;
switch (server_type) {
case net::TestServer::TYPE_HTTPS: {
- test_server.reset(new net::TestServer(https_options, doc_root));
+ test_server.reset(new net::TestServer(server_type,
+ ssl_options,
+ doc_root));
Ryan Sleevi 2012/08/22 09:21:16 nit: Is this line breaking needed? Looks like it f
Takashi Toyoshima 2012/08/22 13:39:16 Yeah, unfortunately it requires 81 characters with
break;
}
case net::TestServer::TYPE_SYNC: {

Powered by Google App Engine
This is Rietveld 408576698