Backed out changeset 4040623689b7 (bug 1064333)

This commit is contained in:
Carsten "Tomcat" Book 2014-10-21 14:38:11 +02:00
parent b9e4510184
commit bee1e93725
4 changed files with 2 additions and 59 deletions

View File

@ -247,7 +247,6 @@ let Impl = {
// The previous build ID, if this is the first run with a new build.
// Undefined if this is not the first run, or the previous build ID is unknown.
_previousBuildID: undefined,
_clientID: null,
/**
* Gets a series of simple measurements (counters). At the moment, this
@ -702,8 +701,7 @@ let Impl = {
addonDetails: AddonManagerPrivate.getTelemetryDetails(),
UIMeasurements: UITelemetry.getUIMeasurements(),
log: TelemetryLog.entries(),
info: info,
clientID: this._clientID,
info: info
};
if (Object.keys(this._slowSQLStartup).length != 0 &&
@ -959,11 +957,6 @@ let Impl = {
this.attachObservers();
this.gatherMemory();
let drs = Cc["@mozilla.org/datareporting/service;1"]
.getService(Ci.nsISupports)
.wrappedJSObject;
this._clientID = yield drs.getClientID();
Telemetry.asyncFetchTelemetryData(function () {});
delete this._timer;
deferred.resolve();

View File

@ -41,20 +41,11 @@ const RW_OWNER = 0600;
const NUMBER_OF_THREADS_TO_LAUNCH = 30;
let gNumberOfThreadsLaunched = 0;
const PREF_BRANCH = "toolkit.telemetry.";
const PREF_ENABLED = PREF_BRANCH + "enabled";
const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
let gHttpServer = new HttpServer();
let gServerStarted = false;
let gRequestIterator = null;
let gDataReportingClientID = null;
XPCOMUtils.defineLazyGetter(this, "gDatareportingService",
() => Cc["@mozilla.org/datareporting/service;1"]
.getService(Ci.nsISupports)
.wrappedJSObject);
function sendPing () {
TelemetryPing.gatherStartup();
@ -171,10 +162,6 @@ function checkPayloadInfo(payload, reason) {
do_check_true(payload.info.revision.startsWith("http"));
}
do_check_true("clientID" in payload);
do_check_neq(payload.clientID, null);
do_check_eq(payload.clientID, gDataReportingClientID);
try {
// If we've not got nsIGfxInfoDebug, then this will throw and stop us doing
// this test.
@ -392,13 +379,6 @@ function run_test() {
do_get_profile();
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
Services.prefs.setBoolPref(PREF_ENABLED, true);
// Send the needed startup notifications to the datareporting service
// to ensure that it has been initialized.
gDatareportingService.observe(null, "app-startup", null);
gDatareportingService.observe(null, "profile-after-change", null);
// Make it look like we've previously failed to lock a profile a couple times.
write_fake_failedprofilelocks_file();
@ -445,12 +425,6 @@ function actualTest() {
run_next_test();
}
add_task(function* asyncSetup() {
yield TelemetryPing.setup();
gDataReportingClientID = yield gDatareportingService.getClientID();
});
// Ensure that not overwriting an existing file fails silently
add_task(function* test_overwritePing() {
let ping = {slug: "foo"}

View File

@ -15,16 +15,10 @@
"use strict"
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm", this);
Cu.import("resource://gre/modules/TelemetryPing.jsm", this);
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "gDatareportingService",
() => Cc["@mozilla.org/datareporting/service;1"]
.getService(Ci.nsISupports)
.wrappedJSObject);
// Force the Telemetry enabled preference so that TelemetryPing.reset() doesn't exit early.
Services.prefs.setBoolPref(TelemetryPing.Constants.PREF_ENABLED, true);
@ -71,11 +65,5 @@ add_task(function* test_newBuild() {
function run_test() {
// Make sure we have a profile directory.
do_get_profile();
// Send the needed startup notifications to the datareporting service
// to ensure that it has been initialized.
gDatareportingService.observe(null, "app-startup", null);
gDatareportingService.observe(null, "profile-after-change", null);
run_next_test();
}

View File

@ -23,14 +23,8 @@ Cu.import("resource://gre/modules/Promise.jsm", this);
Cu.import("resource://gre/modules/TelemetryFile.jsm", this);
Cu.import("resource://gre/modules/TelemetryPing.jsm", this);
Cu.import("resource://gre/modules/Task.jsm", this);
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let {OS: {File, Path, Constants}} = Cu.import("resource://gre/modules/osfile.jsm", {});
XPCOMUtils.defineLazyGetter(this, "gDatareportingService",
() => Cc["@mozilla.org/datareporting/service;1"]
.getService(Ci.nsISupports)
.wrappedJSObject);
// We increment TelemetryFile's MAX_PING_FILE_AGE and
// OVERDUE_PING_FILE_AGE by 1 minute so that our test pings exceed
// those points in time, even taking into account file system imprecision.
@ -196,12 +190,6 @@ function run_test() {
gHttpServer.registerPrefixHandler("/submit/telemetry/", pingHandler);
gHttpServer.start(-1);
do_get_profile();
// Send the needed startup notifications to the datareporting service
// to ensure that it has been initialized.
gDatareportingService.observe(null, "app-startup", null);
gDatareportingService.observe(null, "profile-after-change", null);
Services.prefs.setBoolPref(TelemetryPing.Constants.PREF_ENABLED, true);
Services.prefs.setCharPref(TelemetryPing.Constants.PREF_SERVER,
"http://localhost:" + gHttpServer.identity.primaryPort);