Bug 842262 - Keep ProfD == ProfLD on Android; r=glandium a=bajaj
authorTim Taubert <ttaubert@mozilla.com>
Thu, 28 Feb 2013 22:31:35 +0100
changeset 132384 daf58c4defdb37e55854da305dce4034a7625e1e
parent 132383 361d0355df099c61af804038ddad6f5a8150e589
child 132385 405d840dabbf685ffa0991b7a94db86ea38331c5
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, bajaj
bugs842262
milestone21.0a2
Bug 842262 - Keep ProfD == ProfLD on Android; r=glandium a=bajaj
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1134,16 +1134,20 @@ nsXREDirProvider::GetUserDataDirectoryHo
 #elif defined(MOZ_WIDGET_GONK)
   rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true,
                              getter_AddRefs(localDir));
 #elif defined(XP_UNIX)
   const char* homeDir = getenv("HOME");
   if (!homeDir || !*homeDir)
     return NS_ERROR_FAILURE;
 
+#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
+  aLocal = false;
+#endif
+
   if (aLocal) {
     // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
     const char* cacheHome = getenv("XDG_CACHE_HOME");
     if (cacheHome && *cacheHome) {
       rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true,
                                  getter_AddRefs(localDir));
     } else {
       rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,