Bug 866938 - 2.c/4: rename findThreadRecordByParticipants to findThreadRecordByPlmnAddresses. r=vicamo

This commit is contained in:
Thomas Zimmermann 2014-05-17 02:25:36 +08:00
Родитель 5cd15998cf
Коммит 2db9924ae3
1 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -1072,7 +1072,7 @@ MobileMessageDB.prototype = {
threadParticipants = messageRecord.receivers; threadParticipants = messageRecord.receivers;
} }
} }
self.findThreadRecordByParticipants(threadStore, participantStore, self.findThreadRecordByPlmnAddresses(threadStore, participantStore,
threadParticipants, true, threadParticipants, true,
function(threadRecord, function(threadRecord,
participantIds) { participantIds) {
@ -1645,16 +1645,16 @@ MobileMessageDB.prototype = {
}).bind(this); }).bind(this);
}, },
findParticipantIdsByAddresses: function(aParticipantStore, aAddresses, findParticipantIdsByPlmnAddresses: function(aParticipantStore, aAddresses,
aCreate, aSkipNonexistent, aCallback) { aCreate, aSkipNonexistent, aCallback) {
if (DEBUG) { if (DEBUG) {
debug("findParticipantIdsByAddresses(" debug("findParticipantIdsByPlmnAddresses("
+ JSON.stringify(aAddresses) + ", " + JSON.stringify(aAddresses) + ", "
+ aCreate + ", " + aSkipNonexistent + ")"); + aCreate + ", " + aSkipNonexistent + ")");
} }
if (!aAddresses || !aAddresses.length) { if (!aAddresses || !aAddresses.length) {
if (DEBUG) debug("findParticipantIdsByAddresses: returning null"); if (DEBUG) debug("findParticipantIdsByPlmnAddresses: returning null");
aCallback(null); aCallback(null);
return; return;
} }
@ -1666,7 +1666,7 @@ MobileMessageDB.prototype = {
result.sort(function(a, b) { result.sort(function(a, b) {
return a - b; return a - b;
}); });
if (DEBUG) debug("findParticipantIdsByAddresses: returning " + result); if (DEBUG) debug("findParticipantIdsByPlmnAddresses: returning " + result);
aCallback(result); aCallback(result);
return; return;
} }
@ -1676,7 +1676,7 @@ MobileMessageDB.prototype = {
function(participantRecord) { function(participantRecord) {
if (!participantRecord) { if (!participantRecord) {
if (!aSkipNonexistent) { if (!aSkipNonexistent) {
if (DEBUG) debug("findParticipantIdsByAddresses: returning null"); if (DEBUG) debug("findParticipantIdsByPlmnAddresses: returning null");
aCallback(null); aCallback(null);
return; return;
} }
@ -1688,18 +1688,18 @@ MobileMessageDB.prototype = {
}) (0, []); }) (0, []);
}, },
findThreadRecordByParticipants: function(aThreadStore, aParticipantStore, findThreadRecordByPlmnAddresses: function(aThreadStore, aParticipantStore,
aAddresses, aCreateParticipants, aAddresses, aCreateParticipants,
aCallback) { aCallback) {
if (DEBUG) { if (DEBUG) {
debug("findThreadRecordByParticipants(" + JSON.stringify(aAddresses) debug("findThreadRecordByPlmnAddresses(" + JSON.stringify(aAddresses)
+ ", " + aCreateParticipants + ")"); + ", " + aCreateParticipants + ")");
} }
this.findParticipantIdsByAddresses(aParticipantStore, aAddresses, this.findParticipantIdsByPlmnAddresses(aParticipantStore, aAddresses,
aCreateParticipants, false, aCreateParticipants, false,
function(participantIds) { function(participantIds) {
if (!participantIds) { if (!participantIds) {
if (DEBUG) debug("findThreadRecordByParticipants: returning null"); if (DEBUG) debug("findThreadRecordByPlmnAddresses: returning null");
aCallback(null, null); aCallback(null, null);
return; return;
} }
@ -1708,7 +1708,7 @@ MobileMessageDB.prototype = {
request.onsuccess = function(event) { request.onsuccess = function(event) {
let threadRecord = event.target.result; let threadRecord = event.target.result;
if (DEBUG) { if (DEBUG) {
debug("findThreadRecordByParticipants: return " debug("findThreadRecordByPlmnAddresses: return "
+ JSON.stringify(threadRecord)); + JSON.stringify(threadRecord));
} }
aCallback(threadRecord, participantIds); aCallback(threadRecord, participantIds);
@ -1850,7 +1850,7 @@ MobileMessageDB.prototype = {
realSaveRecord: function(aTransaction, aMessageStore, aParticipantStore, realSaveRecord: function(aTransaction, aMessageStore, aParticipantStore,
aThreadStore, aMessageRecord, aAddresses) { aThreadStore, aMessageRecord, aAddresses) {
let self = this; let self = this;
this.findThreadRecordByParticipants(aThreadStore, aParticipantStore, this.findThreadRecordByPlmnAddresses(aThreadStore, aParticipantStore,
aAddresses, true, aAddresses, true,
function(threadRecord, participantIds) { function(threadRecord, participantIds) {
if (!participantIds) { if (!participantIds) {
@ -3015,7 +3015,7 @@ let FilterSearcherHelper = {
} }
let participantStore = txn.objectStore(PARTICIPANT_STORE_NAME); let participantStore = txn.objectStore(PARTICIPANT_STORE_NAME);
mmdb.findParticipantIdsByAddresses(participantStore, filter.numbers, mmdb.findParticipantIdsByPlmnAddresses(participantStore, filter.numbers,
false, true, false, true,
(function(participantIds) { (function(participantIds) {
if (!participantIds || !participantIds.length) { if (!participantIds || !participantIds.length) {