mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Backed out changeset 0acc877be680 (bug 1013448)
This commit is contained in:
parent
38bcbe4a0e
commit
d874e66479
@ -146,22 +146,19 @@ WeaveService.prototype = {
|
||||
this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
this.timer.initWithCallback({
|
||||
notify: function() {
|
||||
let isConfigured = false;
|
||||
// We only load more if it looks like Sync is configured.
|
||||
let prefs = Services.prefs.getBranch(SYNC_PREFS_BRANCH);
|
||||
if (prefs.prefHasUserValue("username")) {
|
||||
// We have a username. So, do a more thorough check. This will
|
||||
// import a number of modules and thus increase memory
|
||||
// accordingly. We could potentially copy code performed by
|
||||
// this check into this file if our above code is yielding too
|
||||
// many false positives.
|
||||
Components.utils.import("resource://services-sync/main.js");
|
||||
isConfigured = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED;
|
||||
if (!prefs.prefHasUserValue("username")) {
|
||||
return;
|
||||
}
|
||||
let getHistogramById = Services.telemetry.getHistogramById;
|
||||
getHistogramById("WEAVE_CONFIGURED").add(isConfigured);
|
||||
if (isConfigured) {
|
||||
getHistogramById("WEAVE_CONFIGURED_MASTER_PASSWORD").add(Utils.mpEnabled());
|
||||
|
||||
// We have a username. So, do a more thorough check. This will
|
||||
// import a number of modules and thus increase memory
|
||||
// accordingly. We could potentially copy code performed by
|
||||
// this check into this file if our above code is yielding too
|
||||
// many false positives.
|
||||
Components.utils.import("resource://services-sync/main.js");
|
||||
if (Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED) {
|
||||
this.ensureLoaded();
|
||||
}
|
||||
}.bind(this)
|
||||
|
@ -1247,9 +1247,6 @@ Sync11Service.prototype = {
|
||||
return this._lock("service.js: sync",
|
||||
this._notify("sync", "", function onNotify() {
|
||||
|
||||
let histogram = Services.telemetry.getHistogramById("WEAVE_START_COUNT");
|
||||
histogram.add(1);
|
||||
|
||||
let synchronizer = new EngineSynchronizer(this);
|
||||
let cb = Async.makeSpinningCallback();
|
||||
synchronizer.onComplete = cb;
|
||||
@ -1259,9 +1256,6 @@ Sync11Service.prototype = {
|
||||
// we want.
|
||||
let result = cb.wait();
|
||||
|
||||
histogram = Services.telemetry.getHistogramById("WEAVE_COMPLETE_SUCCESS_COUNT");
|
||||
histogram.add(1);
|
||||
|
||||
// We successfully synchronized. Now let's update our declined engines.
|
||||
let meta = this.recordManager.get(this.metaURL);
|
||||
if (!meta) {
|
||||
|
@ -6077,29 +6077,5 @@
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "If a master-password is enabled for this profile"
|
||||
},
|
||||
"WEAVE_CONFIGURED": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "If any version of Firefox Sync is configured for this device"
|
||||
},
|
||||
"WEAVE_CONFIGURED_MASTER_PASSWORD": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
"description": "If both Firefox Sync and Master Password are configured for this device"
|
||||
},
|
||||
"WEAVE_START_COUNT": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 1000,
|
||||
"n_buckets": 10,
|
||||
"description": "The number of times a sync started in this session"
|
||||
},
|
||||
"WEAVE_COMPLETE_SUCCESS_COUNT": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 1000,
|
||||
"n_buckets": 10,
|
||||
"description": "The number of times a sync successfully completed in this session"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user