Bug 597579 - Investigate downloading updates to sd card r=mfinkle a=blocking-fennec

This commit is contained in:
Alex Pakhotin 2010-10-30 17:24:08 -07:00
parent e7d737d71f
commit 3060aedbdf

View File

@ -44,6 +44,7 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
// -----------------------------------------------------------------------
const NS_APP_CACHE_PARENT_DIR = "cachePDir";
const XRE_UPDATE_ROOT_DIR = "UpdRootD";
function DirectoryProvider() {}
@ -72,6 +73,9 @@ DirectoryProvider.prototype = {
default:
return profile;
}
} else if (prop == XRE_UPDATE_ROOT_DIR) {
let dm = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
return dm.defaultDownloadsDirectory;
}
// We are retuning null to show failure instead for throwing an error. The