partial fix for deleting bookmark trees

This commit is contained in:
Dan Mills 2007-10-22 11:27:55 -07:00
parent 6e1eec843c
commit 5c0e1acd51

View File

@ -742,6 +742,11 @@ BookmarksSyncService.prototype = {
_removeCommand: function BSS__removeCommand(command) {
var itemId = this._bms.getItemIdForGUID(command.GUID);
if (itemId < 0) {
this._log.warn("Attempted to remove item " + command.GUID +
", but it does not exist. Skipping.");
return;
}
var type = this._bms.getItemType(itemId);
switch (type) {
@ -1339,6 +1344,21 @@ BookmarksSyncService.prototype = {
this._log.warn("generator not properly closed");
},
_encrypt: function BSS__encrypt(string, passphrase) {
let koFactory = Cc["@mozilla.org/security/keyobjectfactory;1"].
getService(Ci.nsIKeyObjectFactory);
let ko = koFactory.keyFromString(2, passphrase); // 2 is AES
let streamCipher = Cc["@mozilla.org/security/streamcipher;1"].
getService(Ci.nsIStreamCipher);
streamCipher.init(ko);
streamCipher.updateFromString(string);
return streamCipher.finish(true);
},
_decrypt: function BSS__decrypt(string, passphrase) {
// FIXME
},
_onLogin: function BSS__onLogin(success) {
this._loginGen.close();
this._loginGen = null;