Index: remoting/host/simple_host_process.cc |
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc |
index 4199d9fe1e83c77ed2bbea96fd1134e4c3b41d3c..4af95c028c9c3150e6332a11ab2d18e63210b838 100644 |
--- a/remoting/host/simple_host_process.cc |
+++ b/remoting/host/simple_host_process.cc |
@@ -21,8 +21,8 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
#include "base/command_line.h" |
-#include "base/environment.h" |
#include "base/file_path.h" |
+#include "base/file_util.h" |
#include "base/logging.h" |
#include "base/message_loop.h" |
#include "base/path_service.h" |
@@ -69,9 +69,6 @@ namespace { |
const FilePath::CharType kDefaultConfigPath[] = |
FILE_PATH_LITERAL(".ChromotingConfig.json"); |
-const char kHomeDrive[] = "HOMEDRIVE"; |
-const char kHomePath[] = "HOMEPATH"; |
- |
const char kFakeSwitchName[] = "fake"; |
const char kIT2MeSwitchName[] = "it2me"; |
const char kConfigSwitchName[] = "config"; |
@@ -191,21 +188,15 @@ class SimpleHost { |
if (!config_path_.empty()) |
return config_path_; |
- scoped_ptr<base::Environment> env(base::Environment::Create()); |
+ FilePath config_path; |
#if defined(OS_WIN) |
- std::string home_drive; |
- env->GetVar(kHomeDrive, &home_drive); |
- std::string home_path; |
- env->GetVar(kHomePath, &home_path); |
- return FilePath(UTF8ToWide(home_drive)) |
- .Append(UTF8ToWide(home_path)) |
- .Append(kDefaultConfigPath); |
+ PathService::Get(base::DIR_PROFILE, &config_path); |
Wez
2012/03/01 18:03:06
This change moves the config from the home directo
Jamie
2012/03/01 18:22:32
Better still, unless that change is required for t
alexeypa (please no reviews)
2012/03/01 20:33:58
This change does not change the location. There is
Wez
2012/03/01 21:11:36
The home-grown code was using HOMEDRIVE and HOMEPA
alexeypa (please no reviews)
2012/03/01 22:32:41
Yes, I saw that. They can only be different if you
Wez
2012/03/01 22:46:30
Nope. The home directory and profile directory ca
|
#else |
- std::string home_path; |
- env->GetVar(base::env_vars::kHome, &home_path); |
- return FilePath(home_path).Append(kDefaultConfigPath); |
+ config_path = file_util::GetHomeDir(); |
#endif |
+ |
+ return config_path.Append(kDefaultConfigPath); |
} |
void StartHost() { |