| 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 "sync/test/local_sync_test_server.h" | 5 #include "sync/test/local_sync_test_server.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 net::SpawnedTestServer::TYPE_HTTP, // Sync uses the HTTP scheme. | 25 net::SpawnedTestServer::TYPE_HTTP, // Sync uses the HTTP scheme. |
| 26 net::SpawnedTestServer::kLocalhost, | 26 net::SpawnedTestServer::kLocalhost, |
| 27 base::FilePath()), | 27 base::FilePath()), |
| 28 xmpp_port_(xmpp_port) { | 28 xmpp_port_(xmpp_port) { |
| 29 SetPort(port); | 29 SetPort(port); |
| 30 } | 30 } |
| 31 | 31 |
| 32 LocalSyncTestServer::~LocalSyncTestServer() {} | 32 LocalSyncTestServer::~LocalSyncTestServer() {} |
| 33 | 33 |
| 34 bool LocalSyncTestServer::AddCommandLineArguments( | 34 bool LocalSyncTestServer::AddCommandLineArguments( |
| 35 CommandLine* command_line) const { | 35 base::CommandLine* command_line) const { |
| 36 if (!LocalTestServer::AddCommandLineArguments(command_line)) | 36 if (!LocalTestServer::AddCommandLineArguments(command_line)) |
| 37 return false; | 37 return false; |
| 38 if (xmpp_port_ != 0) { | 38 if (xmpp_port_ != 0) { |
| 39 std::string xmpp_port_str = base::IntToString(xmpp_port_); | 39 std::string xmpp_port_str = base::IntToString(xmpp_port_); |
| 40 command_line->AppendArg("--xmpp-port=" + xmpp_port_str); | 40 command_line->AppendArg("--xmpp-port=" + xmpp_port_str); |
| 41 } | 41 } |
| 42 return true; | 42 return true; |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool LocalSyncTestServer::GetTestServerPath( | 45 bool LocalSyncTestServer::GetTestServerPath( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (!GetPyProtoPath(&pyproto_dir)) { | 86 if (!GetPyProtoPath(&pyproto_dir)) { |
| 87 LOG(WARNING) << "Cannot find pyproto dir for generated code. " | 87 LOG(WARNING) << "Cannot find pyproto dir for generated code. " |
| 88 << "Testserver features that rely on it will not work"; | 88 << "Testserver features that rely on it will not work"; |
| 89 return true; | 89 return true; |
| 90 } | 90 } |
| 91 AppendToPythonPath(pyproto_dir.AppendASCII("sync").AppendASCII("protocol")); | 91 AppendToPythonPath(pyproto_dir.AppendASCII("sync").AppendASCII("protocol")); |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace syncer | 95 } // namespace syncer |
| OLD | NEW |