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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // Should always use absolute path to load the root certificate. | 289 // Should always use absolute path to load the root certificate. |
290 base::FilePath root_certificate_path = certificates_dir_; | 290 base::FilePath root_certificate_path = certificates_dir_; |
291 if (!certificates_dir_.IsAbsolute()) { | 291 if (!certificates_dir_.IsAbsolute()) { |
292 base::FilePath src_dir; | 292 base::FilePath src_dir; |
293 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) | 293 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) |
294 return false; | 294 return false; |
295 root_certificate_path = src_dir.Append(certificates_dir_); | 295 root_certificate_path = src_dir.Append(certificates_dir_); |
296 } | 296 } |
297 | 297 |
298 return root_certs->AddFromFile( | 298 return root_certs->AddFromFile( |
299 root_certificate_path.AppendASCII("root_ca_cert.crt")); | 299 root_certificate_path.AppendASCII("root_ca_cert.pem")); |
300 } | 300 } |
301 | 301 |
302 bool BaseTestServer::SetupWhenServerStarted() { | 302 bool BaseTestServer::SetupWhenServerStarted() { |
303 DCHECK(host_port_pair_.port()); | 303 DCHECK(host_port_pair_.port()); |
304 | 304 |
305 if (UsingSSL(type_) && !LoadTestRootCert()) | 305 if (UsingSSL(type_) && !LoadTestRootCert()) |
306 return false; | 306 return false; |
307 | 307 |
308 started_ = true; | 308 started_ = true; |
309 allowed_port_.reset(new ScopedPortException(host_port_pair_.port())); | 309 allowed_port_.reset(new ScopedPortException(host_port_pair_.port())); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 return GenerateAdditionalArguments(arguments); | 391 return GenerateAdditionalArguments(arguments); |
392 } | 392 } |
393 | 393 |
394 bool BaseTestServer::GenerateAdditionalArguments( | 394 bool BaseTestServer::GenerateAdditionalArguments( |
395 base::DictionaryValue* arguments) const { | 395 base::DictionaryValue* arguments) const { |
396 return true; | 396 return true; |
397 } | 397 } |
398 | 398 |
399 } // namespace net | 399 } // namespace net |
OLD | NEW |