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

Unified Diff: base/file_util_posix.cc

Issue 10843041: Add OS_CHROMEOS case in file_util::GetHomeDir() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix styles Created 8 years, 4 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 | « no previous file | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 9a36fb290677a63f2a34d7ccda60693a04c17e2e..6100e10bc4fe8a8000a03750445c9828885e4662 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -54,6 +54,10 @@
#include <grp.h>
#endif
+#if defined(OS_CHROMEOS)
+#include "base/chromeos/chromeos_version.h"
+#endif
+
namespace file_util {
namespace {
@@ -1016,6 +1020,11 @@ bool GetShmemTempDir(FilePath* path, bool executable) {
#endif // !defined(OS_ANDROID)
FilePath GetHomeDir() {
+#if defined(OS_CHROMEOS)
+ if (base::chromeos::IsRunningOnChromeOS())
+ return FilePath("/home/chronos/user");
+#endif
+
const char* home_dir = getenv("HOME");
if (home_dir && home_dir[0])
return FilePath(home_dir);
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698