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