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
This commit is contained in:
Stephen A Pohl 2021-09-28 20:26:33 +00:00
Родитель 5c31466081
Коммит 002ae77528
5 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -5719,14 +5719,13 @@ startup:
record_in_processes:
- main
first_run_is_from_dmg:
is_run_from_dmg:
bug_numbers:
- 1700795
description: >
Recorded on first run of a Firefox install on macOS, with a boolean value
Recorded on every run of a Firefox install on macOS, with a boolean value
indicating whether Firefox is being run directly from .dmg without
installing, or not. Note if running from a .dmg we will get a new ping
everytime the .dmg is remounted due to App Translocation.
installing, or not.
expires: "99"
keyed: false
kind: boolean

Просмотреть файл

@ -134,11 +134,6 @@ interface nsIToolkitProfileService : nsISupports
*/
readonly attribute unsigned long profileCount;
/**
* Returns true if this is the first time the current install has run.
*/
[noscript, notxpcom] readonly attribute boolean isFirstRun;
/**
* Flush the profiles list file. This will fail with
* NS_ERROR_DATABASE_CHANGED if the files on disk have changed since the

Просмотреть файл

@ -2164,9 +2164,6 @@ nsToolkitProfileService::GetProfileCount(uint32_t* aResult) {
return NS_OK;
}
NS_IMETHODIMP_(bool)
nsToolkitProfileService::GetIsFirstRun() { return mIsFirstRun; }
NS_IMETHODIMP
nsToolkitProfileService::Flush() {
if (GetIsListOutdated()) {

Просмотреть файл

@ -358,7 +358,7 @@ bool MaybeInstallFromDmgAndRelaunch() {
@autoreleasepool {
bool isFromDmg = IsAppRunningFromDmg();
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_FIRST_RUN_IS_FROM_DMG, isFromDmg);
Telemetry::ScalarSet(Telemetry::ScalarID::STARTUP_IS_RUN_FROM_DMG, isFromDmg);
if (!isFromDmg) {
return false;

Просмотреть файл

@ -5167,13 +5167,14 @@ nsresult XREMain::XRE_mainRun() {
free(tempArgv);
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
# ifdef MOZILLA_OFFICIAL
// Check if we're running from a DMG and allow the user to install to the
// Applications directory.
if (mProfileSvc->GetIsFirstRun() &&
MacRunFromDmgUtils::MaybeInstallFromDmgAndRelaunch()) {
if (MacRunFromDmgUtils::MaybeInstallFromDmgAndRelaunch()) {
bool userAllowedQuit = true;
appStartup->Quit(nsIAppStartup::eForceQuit, 0, &userAllowedQuit);
}
# endif
#endif
nsCOMPtr<nsIObserverService> obsService =