diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 02:47:40 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 02:47:40 +0000 |
commit | 1107166c5610af410570ca07df4f1699d838c107 (patch) | |
tree | 0e0ce4fc211ed5d6dd5192db315dec0f7e24a2dc /base/mime_util_xdg.cc | |
parent | 4c9af7049b3d2bc242fcee0e804ed71e85f5e543 (diff) | |
download | chromium_src-1107166c5610af410570ca07df4f1699d838c107.zip chromium_src-1107166c5610af410570ca07df4f1699d838c107.tar.gz chromium_src-1107166c5610af410570ca07df4f1699d838c107.tar.bz2 |
Use file_util::GetHomeDir instead of getenv("HOME").
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/2919005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mime_util_xdg.cc')
-rw-r--r-- | base/mime_util_xdg.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/mime_util_xdg.cc b/base/mime_util_xdg.cc index 3f6227e..d00a568 100644 --- a/base/mime_util_xdg.cc +++ b/base/mime_util_xdg.cc @@ -396,8 +396,8 @@ void AddXDGDataDir(const FilePath& dir) { // Add all the xdg icon directories. void InitIconDir() { Singleton<MimeUtilConstants>::get()->icon_dirs_->clear(); - const char* home = getenv("HOME"); - if (home) { + FilePath home = file_util::GetHomeDir(); + if (!home.empty()) { FilePath legacy_data_dir(home); legacy_data_dir = legacy_data_dir.AppendASCII(".icons"); if (file_util::DirectoryExists(legacy_data_dir)) @@ -406,7 +406,7 @@ void InitIconDir() { const char* env = getenv("XDG_DATA_HOME"); if (env) { AddXDGDataDir(FilePath(env)); - } else if (home) { + } else if (!home.empty()) { FilePath local_data_dir(home); local_data_dir = local_data_dir.AppendASCII(".local"); local_data_dir = local_data_dir.AppendASCII("share"); |