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

Side by Side Diff: net/tools/testserver/run_testserver.cc

Issue 2881028: GTTF: test server cleanup: (Closed)
Patch Set: final Created 10 years, 5 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/test/test_server.cc ('k') | net/tools/testserver/testserver.py » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return -1; 48 return -1;
49 } 49 }
50 50
51 // Launch testserver 51 // Launch testserver
52 scoped_refptr<BaseTestServer> test_server; 52 scoped_refptr<BaseTestServer> test_server;
53 if (protocol == "https") { 53 if (protocol == "https") {
54 test_server = HTTPSTestServer::CreateGoodServer(doc_root); 54 test_server = HTTPSTestServer::CreateGoodServer(doc_root);
55 } else if (protocol == "ftp") { 55 } else if (protocol == "ftp") {
56 test_server = FTPTestServer::CreateServer(doc_root); 56 test_server = FTPTestServer::CreateServer(doc_root);
57 } else if (protocol == "http") { 57 } else if (protocol == "http") {
58 test_server = HTTPTestServer::CreateServer(doc_root, NULL); 58 test_server = HTTPTestServer::CreateServer(doc_root);
59 } else { 59 } else {
60 NOTREACHED(); 60 NOTREACHED();
61 } 61 }
62 62
63 printf("testserver running at %s://%s:%d (type ctrl+c to exit)\n", 63 printf("testserver running at %s://%s:%d (type ctrl+c to exit)\n",
64 protocol.c_str(), 64 protocol.c_str(),
65 net::TestServerLauncher::kHostName, 65 net::TestServerLauncher::kHostName,
66 port); 66 port);
67 67
68 message_loop.Run(); 68 message_loop.Run();
69 return 0; 69 return 0;
70 } 70 }
OLDNEW
« no previous file with comments | « net/test/test_server.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698