| 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/host_service.h" | 8 #include "remoting/host/win/host_service.h" |
| 9 | 9 |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 L"Usage: %ls [options]\n" | 73 L"Usage: %ls [options]\n" |
| 74 L"\n" | 74 L"\n" |
| 75 L"Options:\n" | 75 L"Options:\n" |
| 76 L" --console - Run the service interactively for debugging purposes.\n" | 76 L" --console - Run the service interactively for debugging purposes.\n" |
| 77 L" --elevate=<...> - Run <...> elevated.\n" | 77 L" --elevate=<...> - Run <...> elevated.\n" |
| 78 L" --help, --? - Print this message.\n"; | 78 L" --help, --? - Print this message.\n"; |
| 79 | 79 |
| 80 // The command line parameters that should be copied from the service's command | 80 // The command line parameters that should be copied from the service's command |
| 81 // line when launching an elevated child. | 81 // line when launching an elevated child. |
| 82 const char* kCopiedSwitchNames[] = { | 82 const char* kCopiedSwitchNames[] = { |
| 83 "auth-config", "host-config", "chromoting-ipc", switches::kV, | 83 "host-config", "daemon-pipe", switches::kV, switches::kVModule }; |
| 84 switches::kVModule }; | |
| 85 | 84 |
| 86 // Exit codes: | 85 // Exit codes: |
| 87 const int kSuccessExitCode = 0; | 86 const int kSuccessExitCode = 0; |
| 88 const int kUsageExitCode = 1; | 87 const int kUsageExitCode = 1; |
| 89 const int kErrorExitCode = 2; | 88 const int kErrorExitCode = 2; |
| 90 | 89 |
| 91 void usage(const FilePath& program_name) { | 90 void usage(const FilePath& program_name) { |
| 92 LOG(INFO) << StringPrintf(kUsageMessage, | 91 LOG(INFO) << StringPrintf(kUsageMessage, |
| 93 UTF16ToWide(program_name.value()).c_str()); | 92 UTF16ToWide(program_name.value()).c_str()); |
| 94 } | 93 } |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 499 } |
| 501 | 500 |
| 502 remoting::HostService* service = remoting::HostService::GetInstance(); | 501 remoting::HostService* service = remoting::HostService::GetInstance(); |
| 503 if (!service->InitWithCommandLine(command_line)) { | 502 if (!service->InitWithCommandLine(command_line)) { |
| 504 usage(command_line->GetProgram()); | 503 usage(command_line->GetProgram()); |
| 505 return kUsageExitCode; | 504 return kUsageExitCode; |
| 506 } | 505 } |
| 507 | 506 |
| 508 return service->Run(); | 507 return service->Run(); |
| 509 } | 508 } |
| OLD | NEW |