Bug 990200 - Part 2: Set probes in the form submission part. r?MattN
MozReview-Commit-ID: H1BnxBxKg5K
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -294,19 +294,23 @@ FormAutofillParent.prototype = {
changedGUIDs.push(address.guid);
} else {
this.profileStorage.addresses.remove(address.guid);
}
break;
}
changedGUIDs.forEach(guid => this.profileStorage.addresses.notifyUsed(guid));
});
+ // Address should be updated
+ Services.telemetry.scalarAdd("formautofill.addresses.fill_type_autofill_update", 1);
return;
}
this.profileStorage.addresses.notifyUsed(address.guid);
+ // Address is merged successfully
+ Services.telemetry.scalarAdd("formautofill.addresses.fill_type_autofill", 1);
} else {
let changedGUIDs = this.profileStorage.addresses.mergeToStorage(address.record);
if (!changedGUIDs.length) {
changedGUIDs.push(this.profileStorage.addresses.add(address.record));
}
changedGUIDs.forEach(guid => this.profileStorage.addresses.notifyUsed(guid));
// Show first time use doorhanger
@@ -315,12 +319,15 @@ FormAutofillParent.prototype = {
FormAutofillDoorhanger.show(target, "firstTimeUse").then((state) => {
if (state !== "open-pref") {
return;
}
target.ownerGlobal.openPreferences("panePrivacy",
{origin: "autofillDoorhanger"});
});
+ } else {
+ // We want to exclude the first time form filling.
+ Services.telemetry.scalarAdd("formautofill.addresses.fill_type_manual", 1);
}
}
},
};