mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 746121 - Updating the DirectoryProvider to look for user.js on the sdcard. r=vingtetun a=b2g-only
This commit is contained in:
parent
abc9432192
commit
dc2493ecb9
@ -10,23 +10,24 @@ const Cr = Components.results;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const OFFLINE_PROFILE_DIR = "/data/local"
|
||||
const LOCAL_DIR = "/data/local";
|
||||
|
||||
function DirectoryProvider() {
|
||||
}
|
||||
|
||||
DirectoryProvider.prototype = {
|
||||
classID: Components.ID("{9181eb7c-6f87-11e1-90b1-4f59d80dd2e5}"),
|
||||
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider]),
|
||||
|
||||
getFile: function dp_getFile(prop, persistent) {
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (prop == "cachePDir" || prop == "webappsDir") {
|
||||
let localProps = ["cachePDir", "webappsDir", "PrefD"];
|
||||
if (localProps.indexOf(prop) != -1) {
|
||||
prop.persistent = true;
|
||||
let file = Cc["@mozilla.org/file/local;1"]
|
||||
.createInstance(Ci.nsILocalFile)
|
||||
file.initWithPath(OFFLINE_PROFILE_DIR);
|
||||
file.initWithPath(LOCAL_DIR);
|
||||
return file;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user