Chromium Code Reviews| Index: remoting/host/setup/start_host_main.cc |
| diff --git a/remoting/host/setup/start_host.cc b/remoting/host/setup/start_host_main.cc |
| similarity index 97% |
| rename from remoting/host/setup/start_host.cc |
| rename to remoting/host/setup/start_host_main.cc |
| index 0babfed6f9e6979fdacdd961613f311bb04c82a3..199d1139ed072ad1e51a0e14b758f05529a40c17 100644 |
| --- a/remoting/host/setup/start_host.cc |
| +++ b/remoting/host/setup/start_host_main.cc |
| @@ -1,8 +1,8 @@ |
| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// |
| -// A simple command-line app that registers and starts a host. |
| + |
| +#include "remoting/host/setup/start_host_main.h" |
| #include <stddef.h> |
| #include <stdio.h> |
| @@ -31,6 +31,8 @@ |
| #include "remoting/host/win/elevation_helpers.h" |
| #endif // defined(OS_WIN) |
| +namespace { |
| + |
| using remoting::HostStarter; |
|
Sergey Ulanov
2016/06/08 21:47:10
Wouldn't need this if this code was inside remotin
joedow
2016/06/09 04:17:52
Done.
|
| // True if the host was started successfully. |
| @@ -110,7 +112,11 @@ std::string GetAuthorizationCodeUri() { |
| return remoting::GetOauthStartUrl(remoting::GetDefaultOauthRedirectUrl()); |
| } |
| -int main(int argc, char** argv) { |
| +} // namespace |
| + |
| +namespace remoting { |
|
Sergey Ulanov
2016/06/08 21:47:10
Move this before the anonymous namespace above, i.
joedow
2016/06/09 04:17:52
Done.
|
| + |
| +int StartHostMain(int argc, char** argv) { |
| // google_apis::GetOAuth2ClientID/Secret need a static CommandLine. |
| base::CommandLine::Init(argc, argv); |
| const base::CommandLine* command_line = |
| @@ -233,3 +239,5 @@ int main(int argc, char** argv) { |
| return g_started ? 0 : 1; |
| } |
| + |
| +} // namespace remoting |