summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/env_var.cc10
-rw-r--r--base/env_var.h8
2 files changed, 18 insertions, 0 deletions
diff --git a/base/env_var.cc b/base/env_var.cc
index 086191e..d0eaa0c 100644
--- a/base/env_var.cc
+++ b/base/env_var.cc
@@ -87,6 +87,16 @@ class EnvVarGetterImpl : public base::EnvVarGetter {
namespace base {
+namespace env_vars {
+
+#if defined(OS_POSIX)
+// On Posix systems, this variable contains the location of the user's home
+// directory. (e.g, /home/username/).
+const char kHome[] = "HOME";
+#endif
+
+} // namespace env_vars
+
EnvVarGetter::~EnvVarGetter() {}
bool EnvVarGetter::HasEnv(const char* variable_name) {
diff --git a/base/env_var.h b/base/env_var.h
index f0fe81f..c0a45ca 100644
--- a/base/env_var.h
+++ b/base/env_var.h
@@ -11,6 +11,14 @@
namespace base {
+namespace env_vars {
+
+#if defined(OS_POSIX)
+extern const char kHome[];
+#endif
+
+} // namespace env_vars
+
// These are used to derive mocks for unittests.
class EnvVarGetter {
public: