Backed out changeset dcf73ba1d6bc (bug 1124895) for apparently breaking all android tests on a CLOSED TREE

This commit is contained in:
Wes Kocher 2015-03-09 19:14:54 -07:00
Родитель 394607866e
Коммит cc14fa87be
3 изменённых файлов: 1 добавлений и 78 удалений

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

@ -1899,30 +1899,3 @@ Example
"foobar-value"
]
}
org.mozilla.passwordmgr.passwordmgr
-----------------------------------
Daily measurement reporting information about the Password Manager
Version 1
^^^^^^^^^
Property:
numSavedPasswords
number of passwords saved in the Password Manager
enabled
Whether or not the user has disabled the Password Manager in prefernces
Example
^^^^^^^
::
"org.mozilla.passwordmgr.passwordmgr": {
"_v": 1,
"numSavedPasswords": 5,
"enabled": 0,
}

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

@ -16,12 +16,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "UserAutoCompleteResult",
"resource://gre/modules/LoginManagerContent.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AutoCompleteE10S",
"resource://gre/modules/AutoCompleteE10S.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Metrics",
"resource://gre/modules/Metrics.jsm");
this.EXPORTED_SYMBOLS = [ "LoginManagerParent", "PasswordsMetricsProvider" ];
this.EXPORTED_SYMBOLS = [ "LoginManagerParent" ];
var gDebug;
@ -55,51 +51,6 @@ function log(...pieces) {
Services.console.logStringMessage(message);
}
this.PasswordsMetricsProvider = function() {
Metrics.Provider.call(this);
}
PasswordsMetricsProvider.prototype = Object.freeze({
__proto__: Metrics.Provider.prototype,
name: "org.mozilla.passwordmgr",
measurementTypes: [
PasswordsMeasurement1,
],
pullOnly: true,
collectDailyData: function () {
return this.storage.enqueueTransaction(this._recordDailyPasswordData.bind(this));
},
_recordDailyPasswordData: function() {
let m = this.getMeasurement(PasswordsMeasurement1.prototype.name,
PasswordsMeasurement1.prototype.version);
let enabled = Services.prefs.getBoolPref("signon.rememberSignons");
yield m.setDailyLastNumeric("enabled", enabled ? 1 : 0);
let loginsCount = Services.logins.countLogins("", "", "");
yield m.setDailyLastNumeric("numSavedPasswords", loginsCount);
},
});
function PasswordsMeasurement1() {
Metrics.Measurement.call(this);
}
PasswordsMeasurement1.prototype = Object.freeze({
__proto__: Metrics.Measurement.prototype,
name: "passwordmgr",
version: 1,
fields: {
enabled: {type: Metrics.Storage.FIELD_DAILY_LAST_NUMERIC},
numSavedPasswords: {type: Metrics.Storage.FIELD_DAILY_LAST_NUMERIC},
},
});
function prefChanged() {
gDebug = Services.prefs.getBoolPref("signon.debug");
}

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

@ -15,4 +15,3 @@ contract @mozilla.org/login-manager/storage/json;1 {c00c432d-a0c9-46d7-bef6-9c45
#endif
component {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} crypto-SDR.js
contract @mozilla.org/login-manager/crypto/SDR;1 {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}
category healthreport-js-provider-default PasswordsMetricsProvider resource://gre/modules/LoginManagerParent.jsm