mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 4040623689b7 (bug 1064333)
This commit is contained in:
parent
b9e4510184
commit
bee1e93725
@ -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();
|
||||
|
@ -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"}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user