From 677f188d956ff0240924a63be333ed169f510f7e Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Mon, 26 May 2014 10:11:59 +0200 Subject: [PATCH] Backed out changeset 0acc877be680 (bug 1013448) --- services/sync/Weave.js | 23 ++++++++----------- services/sync/modules/service.js | 6 ----- toolkit/components/telemetry/Histograms.json | 24 -------------------- 3 files changed, 10 insertions(+), 43 deletions(-) diff --git a/services/sync/Weave.js b/services/sync/Weave.js index 961bb7f0c45..f5b25721af3 100644 --- a/services/sync/Weave.js +++ b/services/sync/Weave.js @@ -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) diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 9acfb6c52e2..42f6707a46a 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -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) { diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 762e1c83fa8..f70f835a65e 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -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" } }