OLD | NEW |
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 "net/test/test_server.h" | 5 #include "net/test/test_server.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 AppendToPythonPath(pyproto_code_dir); | 297 AppendToPythonPath(pyproto_code_dir); |
298 AppendToPythonPath(pyproto_code_dir.Append(FILE_PATH_LITERAL("sync_pb"))); | 298 AppendToPythonPath(pyproto_code_dir.Append(FILE_PATH_LITERAL("sync_pb"))); |
299 AppendToPythonPath(pyproto_code_dir.Append( | 299 AppendToPythonPath(pyproto_code_dir.Append( |
300 FILE_PATH_LITERAL("device_management_pb"))); | 300 FILE_PATH_LITERAL("device_management_pb"))); |
301 | 301 |
302 return true; | 302 return true; |
303 } | 303 } |
304 | 304 |
305 FilePath TestServer::GetRootCertificatePath() { | 305 FilePath TestServer::GetRootCertificatePath() { |
306 return certificates_dir_.AppendASCII("root_ca_cert.crt"); | 306 return certificates_dir_.AppendASCII("root_ca_cert.pem"); |
307 } | 307 } |
308 | 308 |
309 bool TestServer::LoadTestRootCert() { | 309 bool TestServer::LoadTestRootCert() { |
310 TestRootCerts* root_certs = TestRootCerts::GetInstance(); | 310 TestRootCerts* root_certs = TestRootCerts::GetInstance(); |
311 return root_certs->AddFromFile(GetRootCertificatePath()); | 311 return root_certs->AddFromFile(GetRootCertificatePath()); |
312 } | 312 } |
313 | 313 |
314 bool TestServer::AddCommandLineArguments(CommandLine* command_line) const { | 314 bool TestServer::AddCommandLineArguments(CommandLine* command_line) const { |
315 command_line->AppendSwitchASCII("port", | 315 command_line->AppendSwitchASCII("port", |
316 base::IntToString(host_port_pair_.port())); | 316 base::IntToString(host_port_pair_.port())); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 } | 378 } |
379 if ((port <= 0) || (port > kuint16max)) { | 379 if ((port <= 0) || (port > kuint16max)) { |
380 LOG(ERROR) << "Invalid port value: " << port; | 380 LOG(ERROR) << "Invalid port value: " << port; |
381 return false; | 381 return false; |
382 } | 382 } |
383 host_port_pair_.set_port(port); | 383 host_port_pair_.set_port(port); |
384 return true; | 384 return true; |
385 } | 385 } |
386 | 386 |
387 } // namespace net | 387 } // namespace net |
OLD | NEW |