Skip to content

Commit 002ae77

Browse files
author
Stephen A Pohl
committed
Bug 1732969: Start prompting to install every time that we detect that we're running from a .dmg disk image on macOS, not only on first run. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D126829
1 parent 5c31466 commit 002ae77

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

toolkit/components/telemetry/Scalars.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5719,14 +5719,13 @@ startup:
57195719
record_in_processes:
57205720
- main
57215721

5722-
first_run_is_from_dmg:
5722+
is_run_from_dmg:
57235723
bug_numbers:
57245724
- 1700795
57255725
description: >
5726-
Recorded on first run of a Firefox install on macOS, with a boolean value
5726+
Recorded on every run of a Firefox install on macOS, with a boolean value
57275727
indicating whether Firefox is being run directly from .dmg without
5728-
installing, or not. Note if running from a .dmg we will get a new ping
5729-
everytime the .dmg is remounted due to App Translocation.
5728+
installing, or not.
57305729
expires: "99"
57315730
keyed: false
57325731
kind: boolean

toolkit/profile/nsIToolkitProfileService.idl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ interface nsIToolkitProfileService : nsISupports
134134
*/
135135
readonly attribute unsigned long profileCount;
136136

137-
/**
138-
* Returns true if this is the first time the current install has run.
139-
*/
140-
[noscript, notxpcom] readonly attribute boolean isFirstRun;
141-
142137
/**
143138
* Flush the profiles list file. This will fail with
144139
* NS_ERROR_DATABASE_CHANGED if the files on disk have changed since the

toolkit/profile/nsToolkitProfileService.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,9 +2164,6 @@ nsToolkitProfileService::GetProfileCount(uint32_t* aResult) {
21642164
return NS_OK;
21652165
}
21662166

2167-
NS_IMETHODIMP_(bool)
2168-
nsToolkitProfileService::GetIsFirstRun() { return mIsFirstRun; }
2169-
21702167
NS_IMETHODIMP
21712168
nsToolkitProfileService::Flush() {
21722169
if (GetIsListOutdated()) {

toolkit/xre/MacRunFromDmgUtils.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ bool MaybeInstallFromDmgAndRelaunch() {
358358
@autoreleasepool {
359359
bool isFromDmg = IsAppRunningFromDmg();
360360

361-
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_FIRST_RUN_IS_FROM_DMG, isFromDmg);
361+
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_IS_RUN_FROM_DMG, isFromDmg);
362362

363363
if (!isFromDmg) {
364364
return false;

toolkit/xre/nsAppRunner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5167,13 +5167,14 @@ nsresult XREMain::XRE_mainRun() {
51675167
free(tempArgv);
51685168
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
51695169

5170+
# ifdef MOZILLA_OFFICIAL
51705171
// Check if we're running from a DMG and allow the user to install to the
51715172
// Applications directory.
5172-
if (mProfileSvc->GetIsFirstRun() &&
5173-
MacRunFromDmgUtils::MaybeInstallFromDmgAndRelaunch()) {
5173+
if (MacRunFromDmgUtils::MaybeInstallFromDmgAndRelaunch()) {
51745174
bool userAllowedQuit = true;
51755175
appStartup->Quit(nsIAppStartup::eForceQuit, 0, &userAllowedQuit);
51765176
}
5177+
# endif
51775178
#endif
51785179

51795180
nsCOMPtr<nsIObserverService> obsService =

0 commit comments

Comments
 (0)