Implement GoogleURLTrackerFactory and GoogleURLTrackerClient on iOS
[chromium-blink-merge.git] / remoting / host / ipc_constants.cc
blob9702c6577004f92f7d3571340e2881dfbb1a87fd
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.
5 #include "remoting/host/ipc_constants.h"
7 #include "base/compiler_specific.h"
8 #include "base/logging.h"
9 #include "base/path_service.h"
11 namespace remoting {
13 const char kDaemonPipeSwitchName[] = "daemon-pipe";
15 const base::FilePath::CharType kHostBinaryName[] =
16 FILE_PATH_LITERAL("remoting_host");
18 const base::FilePath::CharType kDesktopBinaryName[] =
19 FILE_PATH_LITERAL("remoting_desktop");
21 bool GetInstalledBinaryPath(const base::FilePath::StringType& binary,
22 base::FilePath* full_path) {
23 base::FilePath dir_path;
24 if (!PathService::Get(base::DIR_EXE, &dir_path)) {
25 LOG(ERROR) << "Failed to get the executable file name.";
26 return false;
29 base::FilePath path = dir_path.Append(binary);
31 #if defined(OS_WIN)
32 path = path.ReplaceExtension(FILE_PATH_LITERAL("exe"));
33 #endif // defined(OS_WIN)
35 *full_path = path;
36 return true;
39 } // namespace remoting