OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/remote_test_server.h" | 5 #include "net/test/remote_test_server.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // Please keep it sync with dictionary SERVER_TYPES in testserver.py | 34 // Please keep it sync with dictionary SERVER_TYPES in testserver.py |
35 std::string GetServerTypeString(BaseTestServer::Type type) { | 35 std::string GetServerTypeString(BaseTestServer::Type type) { |
36 switch (type) { | 36 switch (type) { |
37 case BaseTestServer::TYPE_FTP: | 37 case BaseTestServer::TYPE_FTP: |
38 return "ftp"; | 38 return "ftp"; |
39 case BaseTestServer::TYPE_GDATA: | 39 case BaseTestServer::TYPE_GDATA: |
40 case BaseTestServer::TYPE_HTTP: | 40 case BaseTestServer::TYPE_HTTP: |
41 case BaseTestServer::TYPE_HTTPS: | 41 case BaseTestServer::TYPE_HTTPS: |
42 return "http"; | 42 return "http"; |
| 43 case BaseTestServer::TYPE_SAFEBROWSING: |
| 44 return "safebrowsing"; |
43 case BaseTestServer::TYPE_SYNC: | 45 case BaseTestServer::TYPE_SYNC: |
44 return "sync"; | 46 return "sync"; |
45 case BaseTestServer::TYPE_TCP_ECHO: | 47 case BaseTestServer::TYPE_TCP_ECHO: |
46 return "tcpecho"; | 48 return "tcpecho"; |
47 case BaseTestServer::TYPE_UDP_ECHO: | 49 case BaseTestServer::TYPE_UDP_ECHO: |
48 return "udpecho"; | 50 return "udpecho"; |
49 default: | 51 default: |
50 NOTREACHED(); | 52 NOTREACHED(); |
51 } | 53 } |
52 return std::string(); | 54 return std::string(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 SetPort(test_server_port); | 166 SetPort(test_server_port); |
165 | 167 |
166 SetResourcePath(document_root, FilePath().AppendASCII("net") | 168 SetResourcePath(document_root, FilePath().AppendASCII("net") |
167 .AppendASCII("data") | 169 .AppendASCII("data") |
168 .AppendASCII("ssl") | 170 .AppendASCII("ssl") |
169 .AppendASCII("certificates")); | 171 .AppendASCII("certificates")); |
170 return true; | 172 return true; |
171 } | 173 } |
172 | 174 |
173 } // namespace net | 175 } // namespace net |
174 | |
OLD | NEW |