From f310761d50833b419b15075c9dbb6318270e25eb Mon Sep 17 00:00:00 2001 From: Bob Owen Date: Wed, 27 Jan 2016 11:00:09 +0000 Subject: [PATCH] Bug 1165818: Remove temporary Nightly only MozTemp-* clean-up code. r=jimm --- toolkit/xre/nsAppRunner.cpp | 49 ------------------------------------- 1 file changed, 49 deletions(-) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 5bdefd13630..9d5d17e171c 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -688,51 +688,6 @@ SetUpSandboxEnvironment() } } -#if defined(NIGHTLY_BUILD) -static void -CleanUpOldSandboxEnvironment() -{ - // Temporary code to clean up the old low integrity temp directories. - // The removal of this is tracked by bug 1165818. - nsCOMPtr lowIntegrityMozilla; - nsresult rv = NS_GetSpecialDirectory(NS_WIN_LOW_INTEGRITY_TEMP_BASE, - getter_AddRefs(lowIntegrityMozilla)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return; - } - - nsCOMPtr iter; - rv = lowIntegrityMozilla->GetDirectoryEntries(getter_AddRefs(iter)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return; - } - - bool more; - nsCOMPtr elem; - while (NS_SUCCEEDED(iter->HasMoreElements(&more)) && more) { - rv = iter->GetNext(getter_AddRefs(elem)); - if (NS_FAILED(rv)) { - break; - } - - nsCOMPtr file = do_QueryInterface(elem); - if (!file) { - continue; - } - - nsAutoString leafName; - rv = file->GetLeafName(leafName); - if (NS_FAILED(rv)) { - continue; - } - - if (leafName.Find(NS_LITERAL_STRING("MozTemp-{")) == 0) { - file->Remove(/* aRecursive */ true); - } - } -} -#endif - static void CleanUpSandboxEnvironment() { @@ -741,10 +696,6 @@ CleanUpSandboxEnvironment() return; } -#if defined(NIGHTLY_BUILD) - CleanUpOldSandboxEnvironment(); -#endif - // Get temp directory suffix pref. nsAdoptingString tempDirSuffix = Preferences::GetString("security.sandbox.content.tempDirSuffix");