diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2020-05-05 09:45:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 09:45:23 -0400 |
commit | e0ddf8122123a2c21b7f98a6781bc92b73848fa2 (patch) | |
tree | b49f85502ddbb42cffd038785bfedf19fd2a00c2 /dom | |
parent | 6980b807916490eff6ee7a6791129ef5d76a118e (diff) | |
parent | da375ebedd160c3575e6f429a88f5d3356e83d8c (diff) | |
download | uxp-e0ddf8122123a2c21b7f98a6781bc92b73848fa2.tar.gz |
Merge pull request #1534 from adeshkp/gmp-migration-leftover
Remove a leftover GMP migration function
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/gmp/GMPServiceParent.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/dom/media/gmp/GMPServiceParent.cpp b/dom/media/gmp/GMPServiceParent.cpp index fcf9fa9202..a4afbdad44 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<nsIFile> 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<nsIFile> 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) { |