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