OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/win/daemon_process_main.h" | 8 #include "remoting/host/win/daemon_process_main.h" |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 L"Options:\n" | 37 L"Options:\n" |
38 L" --console - Run the service interactively for debugging purposes.\n" | 38 L" --console - Run the service interactively for debugging purposes.\n" |
39 L" --elevate=<...> - Run <...> elevated.\n" | 39 L" --elevate=<...> - Run <...> elevated.\n" |
40 L" --help, --? - Print this message.\n"; | 40 L" --help, --? - Print this message.\n"; |
41 | 41 |
42 // The command line parameters that should be copied from the service's command | 42 // The command line parameters that should be copied from the service's command |
43 // line when launching an elevated child. | 43 // line when launching an elevated child. |
44 const char* kCopiedSwitchNames[] = { | 44 const char* kCopiedSwitchNames[] = { |
45 "host-config", "daemon-pipe", switches::kV, switches::kVModule }; | 45 "host-config", "daemon-pipe", switches::kV, switches::kVModule }; |
46 | 46 |
47 void usage(const FilePath& program_name) { | 47 void usage(const base::FilePath& program_name) { |
48 LOG(INFO) << StringPrintf(kUsageMessage, | 48 LOG(INFO) << StringPrintf(kUsageMessage, |
49 UTF16ToWide(program_name.value()).c_str()); | 49 UTF16ToWide(program_name.value()).c_str()); |
50 } | 50 } |
51 | 51 |
52 } // namespace | 52 } // namespace |
53 | 53 |
54 namespace remoting { | 54 namespace remoting { |
55 | 55 |
56 int DaemonProcessMain() { | 56 int DaemonProcessMain() { |
57 #ifdef OFFICIAL_BUILD | 57 #ifdef OFFICIAL_BUILD |
(...skipping 22 matching lines...) Expand all Loading... |
80 HostService* service = HostService::GetInstance(); | 80 HostService* service = HostService::GetInstance(); |
81 if (!service->InitWithCommandLine(command_line)) { | 81 if (!service->InitWithCommandLine(command_line)) { |
82 usage(command_line->GetProgram()); | 82 usage(command_line->GetProgram()); |
83 return kUsageExitCode; | 83 return kUsageExitCode; |
84 } | 84 } |
85 | 85 |
86 return service->Run(); | 86 return service->Run(); |
87 } | 87 } |
88 | 88 |
89 } // namespace remoting | 89 } // namespace remoting |
OLD | NEW |