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

Unified Diff: base/file_util_posix.cc

Issue 200473002: Move all callers of GetHomeDir() to PathService::Get(base::DIR_HOME). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move subprocess homedir override to ChromeContentBrowserClient/ChromeMainDelegate Created 6 years, 8 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
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index f04053dd0fdd84051d892361bd29dfa9c8f5be5a..4b2a53769b835c136138ad37d7e908b55f3a11b1 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -458,8 +458,12 @@ bool GetTempDir(FilePath* path) {
#if !defined(OS_MACOSX) // Mac implementation is in file_util_mac.mm.
FilePath GetHomeDir() {
#if defined(OS_CHROMEOS)
- if (SysInfo::IsRunningOnChromeOS())
- return FilePath("/home/chronos/user");
+ if (SysInfo::IsRunningOnChromeOS()) {
+ // On Chrome OS chrome::DIR_USER_DATA is overriden with a primary user
+ // homedir once it becomes available.
+ NOTREACHED() << "Called GetHomeDir() without base::DIR_HOME override";
+ return FilePath("/");
+ }
#endif
const char* home_dir = getenv("HOME");

Powered by Google App Engine
This is Rietveld 408576698