diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 02:59:28 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 02:59:28 +0000 |
commit | 574f6f0cd6e95eee50ba55b27029e51d79dd95e3 (patch) | |
tree | 4188477e3ad98cf127a940b91ead353156b990dd /base | |
parent | 275ccdb4f1ce1e76aad77ba1c2b22109291b577b (diff) | |
download | chromium_src-574f6f0cd6e95eee50ba55b27029e51d79dd95e3.zip chromium_src-574f6f0cd6e95eee50ba55b27029e51d79dd95e3.tar.gz chromium_src-574f6f0cd6e95eee50ba55b27029e51d79dd95e3.tar.bz2 |
base: add home environment variable to env_var.h
BUG=None
TEST=trybots
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Review URL: http://codereview.chromium.org/2847058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/env_var.cc | 10 | ||||
-rw-r--r-- | base/env_var.h | 8 |
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: |