From 0aa1b02b2b724749323c1548179208ded67a1410 Mon Sep 17 00:00:00 2001 From: adeshkp Date: Mon, 4 May 2020 23:41:48 -0400 Subject: Issue #1259 - Remove a leftover GMP migration function --- dom/media/gmp/GMPServiceParent.cpp | 41 -------------------------------------- 1 file changed, 41 deletions(-) (limited to 'dom') diff --git a/dom/media/gmp/GMPServiceParent.cpp b/dom/media/gmp/GMPServiceParent.cpp index fcf9fa920..a4afbdad4 100644 --- a/dom/media/gmp/GMPServiceParent.cpp +++ b/dom/media/gmp/GMPServiceParent.cpp @@ -162,47 +162,6 @@ CloneAndAppend(nsIFile* aFile, const nsAString& aDir) return f.forget(); } -static void -MoveAndOverwrite(nsIFile* aOldParentDir, - nsIFile* aNewParentDir, - const nsAString& aSubDir) -{ - nsresult rv; - - nsCOMPtr srcDir(CloneAndAppend(aOldParentDir, aSubDir)); - if (NS_WARN_IF(!srcDir)) { - return; - } - - if (!FileExists(srcDir)) { - // No sub-directory to be migrated. - return; - } - - // Ensure destination parent directory exists. - rv = aNewParentDir->Create(nsIFile::DIRECTORY_TYPE, 0700); - if (rv != NS_ERROR_FILE_ALREADY_EXISTS && NS_WARN_IF(NS_FAILED(rv))) { - return; - } - - nsCOMPtr dstDir(CloneAndAppend(aNewParentDir, aSubDir)); - if (FileExists(dstDir)) { - // We must have migrated before already, and then ran an old version - // of Gecko again which created storage at the old location. Overwrite - // the previously migrated storage. - rv = dstDir->Remove(true); - if (NS_WARN_IF(NS_FAILED(rv))) { - // MoveTo will fail. - return; - } - } - - rv = srcDir->MoveTo(aNewParentDir, EmptyString()); - if (NS_WARN_IF(NS_FAILED(rv))) { - return; - } -} - static nsresult GMPPlatformString(nsAString& aOutPlatform) { -- cgit v1.2.3