Bug 1060610 - Don't update latest callUrl expiration until it is exfiltrated r=Standard8

This commit is contained in:
Adam Roach [:abr]
2014-09-01 17:17:05 -05:00
parent 7c0440504f
commit 3ae5d6fe01
5 changed files with 108 additions and 36 deletions

View File

@@ -101,7 +101,7 @@ loop.Client = (function($) {
* Callback parameters:
* - err null on successful registration, non-null otherwise.
* - callUrlData an object of the obtained call url data if successful:
* -- call_url: The url of the call
* -- callUrl: The url of the call
* -- expiresAt: The amount of hours until expiry of the url
*
* @param {String} simplepushUrl a registered Simple Push URL
@@ -120,8 +120,6 @@ loop.Client = (function($) {
var urlData = JSON.parse(responseText);
cb(null, this._validate(urlData, expectedCallUrlProperties));
this.mozLoop.noteCallUrlExpiry(urlData.expiresAt);
} catch (err) {
console.log("Error requesting call info", err);
cb(err);
@@ -159,8 +157,6 @@ loop.Client = (function($) {
try {
cb(null);
this.mozLoop.noteCallUrlExpiry((new Date()).getTime() / 1000);
} catch (err) {
console.log("Error deleting call info", err);
cb(err);
@@ -175,7 +171,7 @@ loop.Client = (function($) {
* Callback parameters:
* - err null on successful registration, non-null otherwise.
* - callUrlData an object of the obtained call url data if successful:
* -- call_url: The url of the call
* -- callUrl: The url of the call
* -- expiresAt: The amount of hours until expiry of the url
*
* @param {String} simplepushUrl a registered Simple Push URL