OLD | NEW |
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/test/spawned_test_server/base_test_server.h" | 5 #include "net/test/spawned_test_server/base_test_server.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 new_file_path += "replace_text="; | 293 new_file_path += "replace_text="; |
294 new_file_path += base64_old; | 294 new_file_path += base64_old; |
295 new_file_path += ":"; | 295 new_file_path += ":"; |
296 new_file_path += base64_new; | 296 new_file_path += base64_new; |
297 } | 297 } |
298 | 298 |
299 *replacement_path = new_file_path; | 299 *replacement_path = new_file_path; |
300 return true; | 300 return true; |
301 } | 301 } |
302 | 302 |
| 303 void BaseTestServer::set_ssl_options(const SSLOptions& ssl_options) { |
| 304 ssl_options_ = ssl_options; |
| 305 Init(GetHostname(type_, ssl_options)); |
| 306 } |
| 307 |
303 void BaseTestServer::Init(const std::string& host) { | 308 void BaseTestServer::Init(const std::string& host) { |
304 host_port_pair_ = HostPortPair(host, 0); | 309 host_port_pair_ = HostPortPair(host, 0); |
305 | 310 |
306 // TODO(battre) Remove this after figuring out why the TestServer is flaky. | 311 // TODO(battre) Remove this after figuring out why the TestServer is flaky. |
307 // http://crbug.com/96594 | 312 // http://crbug.com/96594 |
308 log_to_console_ = true; | 313 log_to_console_ = true; |
309 } | 314 } |
310 | 315 |
311 void BaseTestServer::SetResourcePath(const base::FilePath& document_root, | 316 void BaseTestServer::SetResourcePath(const base::FilePath& document_root, |
312 const base::FilePath& certificates_dir) { | 317 const base::FilePath& certificates_dir) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 497 |
493 return GenerateAdditionalArguments(arguments); | 498 return GenerateAdditionalArguments(arguments); |
494 } | 499 } |
495 | 500 |
496 bool BaseTestServer::GenerateAdditionalArguments( | 501 bool BaseTestServer::GenerateAdditionalArguments( |
497 base::DictionaryValue* arguments) const { | 502 base::DictionaryValue* arguments) const { |
498 return true; | 503 return true; |
499 } | 504 } |
500 | 505 |
501 } // namespace net | 506 } // namespace net |
OLD | NEW |