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

Unified Diff: chrome/browser/chromeos/gdata/gdata_cache.cc

Issue 10843041: Add OS_CHROMEOS case in file_util::GetHomeDir() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: chrome/browser/chromeos/gdata/gdata_cache.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.cc b/chrome/browser/chromeos/gdata/gdata_cache.cc
index 889f7720aa301682601c8d407dada9662c66dda4..a76364b7e18a96b81c31549e113104b91e1d0329 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.cc
+++ b/chrome/browser/chromeos/gdata/gdata_cache.cc
@@ -38,20 +38,6 @@ const FilePath::CharType kGDataCacheTmpDownloadsDir[] =
const FilePath::CharType kGDataCacheTmpDocumentsDir[] =
FILE_PATH_LITERAL("tmp/documents");
-// Returns the home directory path, or an empty string if the home directory
-// is not found.
-// Copied from webkit/chromeos/cros_mount_point_provider.h.
-// TODO(satorux): Share the code.
-std::string GetHomeDirectory() {
- if (base::chromeos::IsRunningOnChromeOS())
- return "/home/chronos/user";
-
- const char* home = getenv("HOME");
- if (home)
- return home;
- return "";
-}
-
// Used to tweak GetAmountOfFreeDiskSpace() behavior for testing.
FreeDiskSpaceGetterInterface* global_free_disk_getter_for_testing = NULL;
@@ -62,7 +48,7 @@ int64 GetAmountOfFreeDiskSpace() {
return global_free_disk_getter_for_testing->AmountOfFreeDiskSpace();
return base::SysInfo::AmountOfFreeDiskSpace(
- FilePath::FromUTF8Unsafe(GetHomeDirectory()));
+ FilePath::FromUTF8Unsafe(base::chromeos::GetHomeDirectory()));
}
// Returns true if we have sufficient space to store the given number of

Powered by Google App Engine
This is Rietveld 408576698