Bug 1730287. Fix startup.first_run_is_from_dmg telemetry to report first-run-not-from-dmg stats. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D125301
This commit is contained in:
Jonathan Watt 2021-09-10 23:42:06 +00:00
parent 2724568ff8
commit aba1ed2d69

View File

@ -356,13 +356,14 @@ bool MaybeInstallFromDmgAndRelaunch() {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN; NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
@autoreleasepool { @autoreleasepool {
if (!IsAppRunningFromDmg()) { bool isFromDmg = IsAppRunningFromDmg();
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_FIRST_RUN_IS_FROM_DMG, isFromDmg);
if (!isFromDmg) {
return false; return false;
} }
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_FIRST_RUN_IS_FROM_DMG,
MacRunFromDmgUtils::IsAppRunningFromDmg());
// The Applications directory may not be at /Applications, although in // The Applications directory may not be at /Applications, although in
// practice we're unlikely to encounter since run-from-.dmg is really an // practice we're unlikely to encounter since run-from-.dmg is really an
// issue with novice mac users. Still, look it up correctly: // issue with novice mac users. Still, look it up correctly: