diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-20 10:54:51 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-20 10:54:51 +0100 |
commit | fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f (patch) | |
tree | 12babcd8964575da9fbbcfd516ce1513823451ee /toolkit/mozapps/update/updater | |
parent | 833be88a6dfe1d52ab6a22ec498d515293c9d034 (diff) | |
download | UXP-fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f.tar UXP-fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f.tar.gz UXP-fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f.tar.lz UXP-fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f.tar.xz UXP-fc0a0f13ad6f0e4e60246d2cfd324a2fb1f0b35f.zip |
Remove conditional MOZ_MAINTENANCE_SERVICE code
Tag #145
Diffstat (limited to 'toolkit/mozapps/update/updater')
-rw-r--r-- | toolkit/mozapps/update/updater/updater.cpp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index dbf50329c..2af973868 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -119,9 +119,6 @@ struct UpdateServerThreadArgs #endif #ifdef XP_WIN -#ifdef MOZ_MAINTENANCE_SERVICE -#include "registrycertificates.h" -#endif BOOL PathAppendSafe(LPWSTR base, LPCWSTR extra); BOOL PathGetSiblingFilePath(LPWSTR destinationBuffer, LPCWSTR siblingFilePath, @@ -2024,13 +2021,6 @@ LaunchWinPostProcess(const WCHAR *installationDir, return false; } -#if !defined(TEST_UPDATER) && defined(MOZ_MAINTENANCE_SERVICE) - if (sUsingService && - !DoesBinaryMatchAllowedCertificates(installationDir, exefullpath)) { - return false; - } -#endif - WCHAR dlogFile[MAX_PATH + 1]; if (!PathGetSiblingFilePath(dlogFile, exefullpath, L"uninstall.update")) { return false; @@ -2188,40 +2178,6 @@ WriteStatusFile(int status) WriteStatusFile(text); } -#ifdef MOZ_MAINTENANCE_SERVICE -/* - * Read the update.status file and sets isPendingService to true if - * the status is set to pending-service. - * - * @param isPendingService Out parameter for specifying if the status - * is set to pending-service or not. - * @return true if the information was retrieved and it is pending - * or pending-service. -*/ -static bool -IsUpdateStatusPendingService() -{ - NS_tchar filename[MAXPATHLEN]; - NS_tsnprintf(filename, sizeof(filename)/sizeof(filename[0]), - NS_T("%s/update.status"), gPatchDirPath); - - AutoFile file(NS_tfopen(filename, NS_T("rb"))); - if (file == nullptr) - return false; - - char buf[32] = { 0 }; - fread(buf, sizeof(buf), 1, file); - - const char kPendingService[] = "pending-service"; - const char kAppliedService[] = "applied-service"; - - return (strncmp(buf, kPendingService, - sizeof(kPendingService) - 1) == 0) || - (strncmp(buf, kAppliedService, - sizeof(kAppliedService) - 1) == 0); -} -#endif - #ifdef XP_WIN /* * Read the update.status file and sets isSuccess to true if @@ -2813,20 +2769,6 @@ int NS_main(int argc, NS_tchar **argv) bool testOnlyFallbackKeyExists = false; bool noServiceFallback = false; - // We never want the service to be used unless we build with - // the maintenance service. -#ifdef MOZ_MAINTENANCE_SERVICE - useService = IsUpdateStatusPendingService(); -#ifdef TEST_UPDATER - noServiceFallback = EnvHasValue("MOZ_NO_SERVICE_FALLBACK"); - putenv(const_cast<char*>("MOZ_NO_SERVICE_FALLBACK=")); - // Our tests run with a different apply directory for each test. - // We use this registry key on our test slaves to store the - // allowed name/issuers. - testOnlyFallbackKeyExists = DoesFallbackKeyExist(); -#endif -#endif - // Remove everything except close window from the context menu { HKEY hkApp = nullptr; @@ -3030,10 +2972,6 @@ int NS_main(int argc, NS_tchar **argv) #endif #ifdef XP_WIN -#ifdef MOZ_MAINTENANCE_SERVICE - sUsingService = EnvHasValue("MOZ_USING_SERVICE"); - putenv(const_cast<char*>("MOZ_USING_SERVICE=")); -#endif // lastFallbackError keeps track of the last error for the service not being // used, in case of an error when fallback is not enabled we write the // error to the update.status file. |