From 484200b01b146e09ae24114fbd88bae64d099759 Mon Sep 17 00:00:00 2001 From: adeshkp Date: Sat, 9 Nov 2019 23:07:27 +0530 Subject: Issue #1259 - Part 5. Remove migration path for Adobe GMP storage As a cleanup task, also remove GMP storage migration for Fx 42 era. --- dom/media/gmp/GMPServiceParent.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'dom/media') diff --git a/dom/media/gmp/GMPServiceParent.cpp b/dom/media/gmp/GMPServiceParent.cpp index 2b4831cd6..fcf9fa920 100644 --- a/dom/media/gmp/GMPServiceParent.cpp +++ b/dom/media/gmp/GMPServiceParent.cpp @@ -203,29 +203,6 @@ MoveAndOverwrite(nsIFile* aOldParentDir, } } -static void -MigratePreGecko42StorageDir(nsIFile* aOldStorageDir, - nsIFile* aNewStorageDir) -{ - MoveAndOverwrite(aOldStorageDir, aNewStorageDir, NS_LITERAL_STRING("id")); - MoveAndOverwrite(aOldStorageDir, aNewStorageDir, NS_LITERAL_STRING("storage")); -} - -static void -MigratePreGecko45StorageDir(nsIFile* aStorageDirBase) -{ - nsCOMPtr adobeStorageDir(CloneAndAppend(aStorageDirBase, NS_LITERAL_STRING("gmp-eme-adobe"))); - if (NS_WARN_IF(!adobeStorageDir)) { - return; - } - - // The base storage dir in pre-45 contained "id" and "storage" subdirs. - // We assume all storage in the base storage dir that aren't known to GMP - // storage are records for the Adobe GMP. - MoveAndOverwrite(aStorageDirBase, adobeStorageDir, NS_LITERAL_STRING("id")); - MoveAndOverwrite(aStorageDirBase, adobeStorageDir, NS_LITERAL_STRING("storage")); -} - static nsresult GMPPlatformString(nsAString& aOutPlatform) { @@ -308,19 +285,6 @@ GeckoMediaPluginServiceParent::InitStorage() return rv; } - // Prior to 42, GMP storage was stored in $profileDir/gmp/. After 42, it's - // stored in $profileDir/gmp/$platform/. So we must migrate any old records - // from the old location to the new location, for forwards compatibility. - MigratePreGecko42StorageDir(gmpDirWithoutPlatform, mStorageBaseDir); - - // Prior to 45, GMP storage was not separated by plugin. In 45 and after, - // it's stored in $profile/gmp/$platform/$gmpName. So we must migrate old - // records from the old location to the new location, for forwards - // compatibility. We assume all directories in the base storage dir that - // aren't known to GMP storage are records for the Adobe GMP, since it - // was first. - MigratePreGecko45StorageDir(mStorageBaseDir); - return GeckoMediaPluginService::Init(); } -- cgit v1.2.3