| 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/branding.h" | 5 #include "remoting/host/branding.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/stringize_macros.h" |
| 9 | 10 |
| 10 namespace { | 11 namespace { |
| 11 | 12 |
| 12 // TODO(lambroslambrou): The default locations should depend on whether Chrome | 13 // TODO(lambroslambrou): The default locations should depend on whether Chrome |
| 13 // branding is enabled - this means also modifying the Python daemon script. | 14 // branding is enabled - this means also modifying the Python daemon script. |
| 14 // The actual location of the files is ultimately determined by the service | 15 // The actual location of the files is ultimately determined by the service |
| 15 // daemon and NPAPI implementation - these defaults are only used in case the | 16 // daemon and NPAPI implementation - these defaults are only used in case the |
| 16 // command-line switches are absent. | 17 // command-line switches are absent. |
| 17 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 18 #ifdef OFFICIAL_BUILD | 19 #ifdef OFFICIAL_BUILD |
| 19 const FilePath::CharType kConfigDir[] = | 20 const FilePath::CharType kConfigDir[] = |
| 20 FILE_PATH_LITERAL("Google\\Chrome Remote Desktop"); | 21 FILE_PATH_LITERAL("Google\\Chrome Remote Desktop"); |
| 21 #else | 22 #else |
| 22 const FilePath::CharType kConfigDir[] = | 23 const FilePath::CharType kConfigDir[] = |
| 23 FILE_PATH_LITERAL("Chromoting"); | 24 FILE_PATH_LITERAL("Chromoting"); |
| 24 #endif | 25 #endif |
| 25 #elif defined(OS_MACOSX) | 26 #elif defined(OS_MACOSX) |
| 26 const FilePath::CharType kConfigDir[] = | 27 const FilePath::CharType kConfigDir[] = |
| 27 FILE_PATH_LITERAL("Chrome Remote Desktop"); | 28 FILE_PATH_LITERAL("Chrome Remote Desktop"); |
| 28 #else | 29 #else |
| 29 const FilePath::CharType kConfigDir[] = | 30 const FilePath::CharType kConfigDir[] = |
| 30 FILE_PATH_LITERAL(".config/chrome-remote-desktop"); | 31 FILE_PATH_LITERAL(".config/chrome-remote-desktop"); |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 } // namespace | 34 } // namespace |
| 34 | 35 |
| 35 namespace remoting { | 36 namespace remoting { |
| 36 | 37 |
| 37 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
| 38 const char kWindowsServiceName[] = "chromoting"; | 39 const char16 kWindowsServiceName[] = TO_L_STRING("chromoting"); |
| 39 #endif | 40 #endif |
| 40 | 41 |
| 41 FilePath GetConfigDir() { | 42 FilePath GetConfigDir() { |
| 42 FilePath app_data_dir; | 43 FilePath app_data_dir; |
| 43 | 44 |
| 44 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
| 45 PathService::Get(base::DIR_COMMON_APP_DATA, &app_data_dir); | 46 PathService::Get(base::DIR_COMMON_APP_DATA, &app_data_dir); |
| 46 #elif defined(OS_MACOSX) | 47 #elif defined(OS_MACOSX) |
| 47 PathService::Get(base::DIR_APP_DATA, &app_data_dir); | 48 PathService::Get(base::DIR_APP_DATA, &app_data_dir); |
| 48 #else | 49 #else |
| 49 app_data_dir = file_util::GetHomeDir(); | 50 app_data_dir = file_util::GetHomeDir(); |
| 50 #endif | 51 #endif |
| 51 | 52 |
| 52 return app_data_dir.Append(kConfigDir); | 53 return app_data_dir.Append(kConfigDir); |
| 53 } | 54 } |
| 54 | 55 |
| 55 } // namespace remoting | 56 } // namespace remoting |
| OLD | NEW |