Skip to content

Commit

Permalink
Bug 1844908 - Remove pre-Win10-specific codepath from toolkit/system/…
Browse files Browse the repository at this point in the history
…windowsPackageManager/. r=bhearsum,nrishel

Differential Revision: https://phabricator.services.mozilla.com/D184303
  • Loading branch information
vyv03354 committed Jul 25, 2023
1 parent 9262e9f commit 97aa440
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions toolkit/system/windowsPackageManager/nsWindowsPackageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "nsWindowsPackageManager.h"
#include "mozilla/Logging.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/WinHeaderOnlyUtils.h"
#include "mozilla/mscom/EnsureMTA.h"
#ifndef __MINGW32__
Expand Down Expand Up @@ -49,11 +48,6 @@ nsWindowsPackageManager::FindUserInstalledPackages(
#ifdef __MINGW32__
return NS_ERROR_NOT_IMPLEMENTED;
#else
// The classes we're using are only available beginning with Windows 10
if (!mozilla::IsWin10OrLater()) {
return NS_ERROR_NOT_IMPLEMENTED;
}

ComPtr<IInspectable> pmInspectable;
ComPtr<Deployment::IPackageManager> pm;
HRESULT hr = RoActivateInstance(
Expand Down Expand Up @@ -116,11 +110,6 @@ nsWindowsPackageManager::GetInstalledDate(uint64_t* ts) {
#ifdef __MINGW32__
return NS_ERROR_NOT_IMPLEMENTED;
#else
// The classes we're using are only available beginning with Windows 10
if (!mozilla::IsWin10OrLater()) {
return NS_ERROR_NOT_IMPLEMENTED;
}

ComPtr<ApplicationModel::IPackageStatics> pkgStatics;
HRESULT hr = RoGetActivationFactory(
HStringReference(RuntimeClass_Windows_ApplicationModel_Package).Get(),
Expand Down Expand Up @@ -157,9 +146,8 @@ nsWindowsPackageManager::GetCampaignId(nsAString& aCampaignId) {
#ifdef __MINGW32__
return NS_ERROR_NOT_IMPLEMENTED;
#else
// The classes we're using are only available beginning with Windows 10,
// and this is only relevant for MSIX packaged builds.
if (!mozilla::IsWin10OrLater() || !mozilla::HasPackageIdentity()) {
// This is only relevant for MSIX packaged builds.
if (!mozilla::HasPackageIdentity()) {
return NS_ERROR_NOT_IMPLEMENTED;
}

Expand Down

0 comments on commit 97aa440

Please sign in to comment.