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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (!base::StringToInt(port_str, &port_int)) { | 63 if (!base::StringToInt(port_str, &port_int)) { |
64 return false; | 64 return false; |
65 } | 65 } |
66 } | 66 } |
67 *port = static_cast<uint16>(port_int); | 67 *port = static_cast<uint16>(port_int); |
68 return true; | 68 return true; |
69 } | 69 } |
70 | 70 |
71 int main(int argc, const char* argv[]) { | 71 int main(int argc, const char* argv[]) { |
72 base::AtExitManager at_exit_manager; | 72 base::AtExitManager at_exit_manager; |
73 MessageLoopForIO message_loop; | 73 base::MessageLoopForIO message_loop; |
74 | 74 |
75 // Process command line | 75 // Process command line |
76 CommandLine::Init(argc, argv); | 76 CommandLine::Init(argc, argv); |
77 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 77 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
78 | 78 |
79 if (!logging::InitLogging( | 79 if (!logging::InitLogging( |
80 FILE_PATH_LITERAL("sync_testserver.log"), | 80 FILE_PATH_LITERAL("sync_testserver.log"), |
81 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, | 81 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, |
82 logging::LOCK_LOG_FILE, | 82 logging::LOCK_LOG_FILE, |
83 logging::APPEND_TO_OLD_LOG_FILE, | 83 logging::APPEND_TO_OLD_LOG_FILE, |
(...skipping 29 matching lines...) Expand all Loading... |
113 printf("Error: failed to start python sync test server. Exiting.\n"); | 113 printf("Error: failed to start python sync test server. Exiting.\n"); |
114 return -1; | 114 return -1; |
115 } | 115 } |
116 | 116 |
117 printf("Python sync test server running at %s (type ctrl+c to exit)\n", | 117 printf("Python sync test server running at %s (type ctrl+c to exit)\n", |
118 test_server->host_port_pair().ToString().c_str()); | 118 test_server->host_port_pair().ToString().c_str()); |
119 | 119 |
120 message_loop.Run(); | 120 message_loop.Run(); |
121 return 0; | 121 return 0; |
122 } | 122 } |
OLD | NEW |