gecko-dev/toolkit/xre
Kirk Steuber 19c8368ea5 Bug 1458314 - Move the update directory to an installation specific location r=rstrong
This change applies to Windows only.
Firefox will need to migrate the directory from the old location to the new location. This will be done only once by setting the pref `app.update.migrated.updateDir2.<install path hash>` to `true` once migration has completed.

Note: The pref name app.update.migrated.updateDir has already been used, thus the '2' suffix. It can be found in ESR24.

This also removes the old handling fallback for generating the update directory path. Since xulrunner is no longer supported, this should no longer be needed. If neither the vendor nor app name are defined, it falls back to the literal string "Mozilla".

The code to generate the update directory path and the installation hash have been moved to the updatecommon library. This will allow those functions to be used in Firefox, the Mozilla Maintenance Service, the Mozilla Maintenance Service Installer, and TestAUSHelper.

Additionally, the function that generates the update directory path now has extra functionality. It creates the update directory, sets the permissions on it and, optionally, recursively sets the permissions on everything within.

This patch adds functionality that allows Firefox to set permissions on the new update directory on write failure. It attempts to set the permissions itself and, if that fails and the maintenance service is enabled, it calls into the maintenance service to try from there. If a write fails and the permissions cannot be fixed, the user is prompted to reinstall.

Differential Revision: https://phabricator.services.mozilla.com/D4249

--HG--
rename : toolkit/mozapps/update/updater/win_dirent.cpp => toolkit/mozapps/update/common/win_dirent.cpp
rename : toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js => toolkit/mozapps/update/tests/unit_aus_update/updateDirectoryMigrate.js
extra : moz-landing-system : lando
2018-10-23 21:41:04 +00:00
..
test Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop 2018-08-31 05:59:17 +00:00
AutoSQLiteLifetime.cpp
AutoSQLiteLifetime.h
Bootstrap.cpp
Bootstrap.h
CmdLineAndEnvUtils.h Bug 1489944 - Fixed some std::move warnings - r=froydnj 2018-09-10 15:51:48 +00:00
CreateAppData.cpp
EventTracer.cpp
EventTracer.h
glxtest.cpp
MacApplicationDelegate.h
MacApplicationDelegate.mm Bug 1085391 - Support Yosemite Handoff 'web browsing' activity type. r=spohl 2018-10-20 04:47:38 +00:00
MacAutoreleasePool.h
MacAutoreleasePool.mm
MacLaunchHelper.h
MacLaunchHelper.mm
moz.build Bug 1458314 - Move the update directory to an installation specific location r=rstrong 2018-10-23 21:41:04 +00:00
MozMeegoAppService.h
nsAndroidStartup.cpp
nsAppRunner.cpp Bug 1496327 - Remove MOZ_ENABLE_XREMOTE r=froydnj 2018-10-04 13:55:55 +00:00
nsAppRunner.h Bug 1491576 - Remove the XPCOM registration for nsNativeAppSupportBase; r=mccr8 2018-09-15 13:54:52 -04:00
nsAppStartupNotifier.cpp Bug 1491741 - Part 2: DeCOMtaminate nsAppStartupNotifier; r=mccr8 2018-09-17 23:45:02 -04:00
nsAppStartupNotifier.h Bug 1491741 - Part 2: DeCOMtaminate nsAppStartupNotifier; r=mccr8 2018-09-17 23:45:02 -04:00
nsCommandLineServiceMac.cpp
nsCommandLineServiceMac.h
nsConsoleWriter.cpp Bug 1488628 - Change nsIConsoleMessage.message to an AString. r=erahm 2018-09-05 13:31:42 +10:00
nsEmbeddingModule.cpp Bug 1493310: Add a way to access certain functionality of nsXREDirProvider for testing purposes. r=froydnj 2018-09-24 14:55:37 +00:00
nsEmbedFunctions.cpp Bug 1491741 - Part 2: DeCOMtaminate nsAppStartupNotifier; r=mccr8 2018-09-17 23:45:02 -04:00
nsGDKErrorHandler.cpp
nsGDKErrorHandler.h
nsIAppStartupNotifier.h Bug 1491741 - Part 2: DeCOMtaminate nsAppStartupNotifier; r=mccr8 2018-09-17 23:45:02 -04:00
nsINativeAppSupport.idl
nsIWinAppHelper.idl
nsIXREDirProvider.idl Bug 1493310: Add a way to access certain functionality of nsXREDirProvider for testing purposes. r=froydnj 2018-09-24 14:55:37 +00:00
nsNativeAppSupportBase.cpp
nsNativeAppSupportBase.h
nsNativeAppSupportCocoa.mm Bug 1491560 - Remove the XPCOM registration for nsCommandLine; r=mccr8 2018-09-15 12:16:39 -04:00
nsNativeAppSupportDefault.cpp
nsNativeAppSupportUnix.cpp
nsNativeAppSupportWin.cpp Bug 1493414 - Re-enable warnings as errors on clang-cl in toolkit/xre/. r=froydnj 2018-09-18 22:04:28 +09:00
nsNativeAppSupportWin.h
nsSigHandlers.cpp
nsSigHandlers.h
nsUpdateDriver.cpp Bug 1458314 - Move the update directory to an installation specific location r=rstrong 2018-10-23 21:41:04 +00:00
nsUpdateDriver.h
nsWindowsRestart.cpp Bug 1493414 - Re-enable warnings as errors on clang-cl in toolkit/xre/. r=froydnj 2018-09-18 22:04:28 +09:00
nsWindowsWMain.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsX11ErrorHandler.cpp
nsX11ErrorHandler.h
nsXREDirProvider.cpp Bug 1458314 - Move the update directory to an installation specific location r=rstrong 2018-10-23 21:41:04 +00:00
nsXREDirProvider.h Bug 1458314 - Move the update directory to an installation specific location r=rstrong 2018-10-23 21:41:04 +00:00
platform.ini
PolicyChecks.h
ProfileReset.cpp
ProfileReset.h
SafeMode.h Bug 1488547: Add flag to IsSafeModeRequested to skip keypress checks; r=mhowell 2018-09-04 19:55:53 +00:00
UIKitDirProvider.h
UIKitDirProvider.mm
updaterfileutils_osx.h
updaterfileutils_osx.mm
WinDllServices.cpp
WinDllServices.h