OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/host/ipc_consts.h" |
| 6 |
| 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" |
| 10 |
| 11 namespace remoting { |
| 12 |
| 13 const char kDaemonPipeSwitchName[] = "daemon-pipe"; |
| 14 |
| 15 const FilePath::CharType kDaemonBinaryName[] = |
| 16 FILE_PATH_LITERAL("remoting_daemon"); |
| 17 |
| 18 const FilePath::CharType kHostBinaryName[] = FILE_PATH_LITERAL("remoting_host"); |
| 19 |
| 20 bool GetInstalledBinaryPath(const FilePath::StringType& binary, |
| 21 FilePath* full_path) { |
| 22 FilePath dir_path; |
| 23 if (!PathService::Get(base::DIR_EXE, &dir_path)) { |
| 24 LOG(ERROR) << "Failed to get the executable file name."; |
| 25 return false; |
| 26 } |
| 27 |
| 28 FilePath path = dir_path.Append(binary); |
| 29 |
| 30 #if defined(OS_WIN) |
| 31 path = path.ReplaceExtension(FILE_PATH_LITERAL("exe")); |
| 32 #endif // defined(OS_WIN) |
| 33 |
| 34 *full_path = path; |
| 35 return true; |
| 36 } |
| 37 |
| 38 } // namespace remoting |
OLD | NEW |