diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-13 20:46:29 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-13 20:46:29 +0000 |
commit | cd6c8304ba29fa49f40db34d072a4e8311100216 (patch) | |
tree | 82af002e7fb0b31ac824873691f7b7c5383643aa /remoting/host/remoting_me2me_host.cc | |
parent | c96484589926db5f95c86efef0f5bdfd35970582 (diff) | |
download | chromium_src-cd6c8304ba29fa49f40db34d072a4e8311100216.zip chromium_src-cd6c8304ba29fa49f40db34d072a4e8311100216.tar.gz chromium_src-cd6c8304ba29fa49f40db34d072a4e8311100216.tar.bz2 |
Port remoting_me2me_host to Mac.
This also changes the default config directory for Windows (removes ".config" from the path).
BUG=117575
TEST=Manual
Review URL: http://codereview.chromium.org/9648018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/remoting_me2me_host.cc')
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 0440303..693150f 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -55,8 +55,19 @@ const char kApplicationName[] = "remoting_me2me_host"; const char kAuthConfigSwitchName[] = "auth-config"; const char kHostConfigSwitchName[] = "host-config"; +// TODO(lambroslambrou): The default locations should depend on whether Chrome +// branding is enabled - this means also modifying the Python daemon script. +// The actual location of the files is ultimately determined by the service +// daemon and NPAPI implementation - these defaults are only used in case the +// command-line switches are absent. +#if defined(OS_WIN) || defined(OS_MACOSX) const FilePath::CharType kDefaultConfigDir[] = - FILE_PATH_LITERAL(".config/chrome-remote-desktop"); + FILE_PATH_LITERAL("Chrome Remote Desktop"); +#else +const FilePath::CharType kDefaultConfigDir[] = + FILE_PATH_LITERAL("chrome-remote-desktop"); +#endif + const FilePath::CharType kDefaultAuthConfigFile[] = FILE_PATH_LITERAL("auth.json"); const FilePath::CharType kDefaultHostConfigFile[] = @@ -69,9 +80,12 @@ FilePath GetDefaultConfigDir() { FilePath default_config_dir; #if defined(OS_WIN) - PathService::Get(base::DIR_PROFILE, &default_config_dir); + PathService::Get(base::DIR_LOCAL_APP_DATA, &default_config_dir); +#elif defined(OS_MACOSX) + PathService::Get(base::DIR_APP_DATA, &default_config_dir); #else - default_config_dir = file_util::GetHomeDir(); + default_config_dir = file_util::GetHomeDir().Append(FILE_PATH_LITERAL( + ".config")); #endif return default_config_dir.Append(kDefaultConfigDir); |