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