Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Unified Diff: chrome/browser/importer/firefox_importer_utils_linux.cc

Issue 2919005: Use file_util::GetHomeDir instead of getenv("HOME"). (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/nss_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/firefox_importer_utils_linux.cc
diff --git a/chrome/browser/importer/firefox_importer_utils_linux.cc b/chrome/browser/importer/firefox_importer_utils_linux.cc
index cb815dc431ade65e65b30db8b44f2ac7a2bf6058..eeefd38f2bbb6eb493ba60d2d87e8d4fe62ff34d 100644
--- a/chrome/browser/importer/firefox_importer_utils_linux.cc
+++ b/chrome/browser/importer/firefox_importer_utils_linux.cc
@@ -10,9 +10,9 @@ FilePath GetProfilesINI() {
FilePath ini_file;
// The default location of the profile folder containing user data is
// under user HOME directory in .mozilla/firefox folder on Linux.
- const char *home = getenv("HOME");
- if (home && home[0]) {
- ini_file = FilePath(home).Append(".mozilla/firefox/profiles.ini");
+ FilePath home = file_util::GetHomeDir();
+ if (!home.empty()) {
+ ini_file = home.Append(".mozilla/firefox/profiles.ini");
}
if (file_util::PathExists(ini_file))
return ini_file;
« no previous file with comments | « base/nss_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698