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

Unified Diff: chrome/common/chrome_paths.cc

Issue 11031008: Upstreaming chrome/common/chrome_* diff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing Nishel's nits Created 8 years, 3 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 | « chrome/common/chrome_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index dd098ab0fb49e64f3f5527d475664d245b043054..9a666a3774a818e38bb74e5b6a89e7b62ea485af 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -15,6 +15,10 @@
#include "chrome/common/chrome_paths_internal.h"
#include "ui/base/ui_base_paths.h"
+#if defined(OS_ANDROID)
+#include "base/android/path_utils.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#endif
@@ -188,15 +192,23 @@ bool PathProvider(int key, FilePath* result) {
// Fall through for all other platforms.
#endif
case chrome::DIR_DEFAULT_DOWNLOADS:
+#if defined(OS_ANDROID)
+ if (!base::android::GetDownloadsDirectory(&cur))
+ return false;
+#else
if (!GetUserDownloadsDirectory(&cur))
return false;
// Do not create the download directory here, we have done it twice now
// and annoyed a lot of users.
+#endif
break;
case chrome::DIR_CRASH_DUMPS:
#if defined(OS_CHROMEOS)
// ChromeOS uses a separate directory. See http://crosbug.com/25089
cur = FilePath("/var/log/chrome");
+#elif defined(OS_ANDROID)
+ if (!base::android::GetCacheDirectory(&cur))
+ return false;
#else
// The crash reports are always stored relative to the default user data
// directory. This avoids the problem of having to re-initialize the
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698