зеркало из https://github.com/mozilla/pjs.git
Bug 384843 - Remove unused functions getFileRelativeTo and _needsToPromptForUpdate, patch by Jason Barnabe <jason_barnabe@fastmail.fm>, r=gavin
This commit is contained in:
Родитель
6e549fb429
Коммит
5667c57fe0
|
@ -84,15 +84,6 @@ function getFile(key) {
|
|||
return dirSvc.get(key, Components.interfaces.nsIFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full path given a relative path and a base directory.
|
||||
*/
|
||||
function getFileRelativeTo(dir, relPath) {
|
||||
var file = dir.clone().QueryInterface(Components.interfaces.nsILocalFile);
|
||||
file.setRelativeDescriptor(dir, relPath);
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new file object given a native file path.
|
||||
* @param path
|
||||
|
|
|
@ -1258,29 +1258,6 @@ UpdateService.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
_needsToPromptForUpdate: function(updates) {
|
||||
// First, check for Extension incompatibilities. These trump any preference
|
||||
// settings.
|
||||
var em = Components.classes["@mozilla.org/extensions/manager;1"]
|
||||
.getService(Components.interfaces.nsIExtensionManager);
|
||||
var incompatibleList = { };
|
||||
for (var i = 0; i < updates.length; ++i) {
|
||||
var count = {};
|
||||
em.getIncompatibleItemList(gApp.ID, updates[i].extensionVersion,
|
||||
nsIUpdateItem.TYPE_ADDON, false, count);
|
||||
if (count.value > 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Now, inspect user preferences.
|
||||
|
||||
// No prompt necessary, silently update...
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Notified when a timer fires
|
||||
* @param timer
|
||||
|
|
Загрузка…
Ссылка в новой задаче