summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/AddonPathService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/extensions/AddonPathService.cpp')
-rw-r--r--toolkit/mozapps/extensions/AddonPathService.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/toolkit/mozapps/extensions/AddonPathService.cpp b/toolkit/mozapps/extensions/AddonPathService.cpp
index 8a405c0ea..006149100 100644
--- a/toolkit/mozapps/extensions/AddonPathService.cpp
+++ b/toolkit/mozapps/extensions/AddonPathService.cpp
@@ -14,7 +14,6 @@
#include "nsThreadUtils.h"
#include "nsIIOService.h"
#include "nsNetUtil.h"
-#include "nsIAddonPolicyService.h"
#include "nsIFileURL.h"
#include "nsIResProtocolHandler.h"
#include "nsIChromeRegistry.h"
@@ -129,16 +128,6 @@ AddonPathService::InsertPath(const nsAString& path, const nsAString& addonIdStri
return NS_OK;
}
-NS_IMETHODIMP
-AddonPathService::MapURIToAddonId(nsIURI* aURI, nsAString& addonIdString)
-{
- if (JSAddonId* id = MapURIToAddonID(aURI)) {
- JSFlatString* flat = JS_ASSERT_STRING_IS_FLAT(JS::StringOfAddonId(id));
- AssignJSFlatString(addonIdString, flat);
- }
- return NS_OK;
-}
-
static nsresult
ResolveURI(nsIURI* aURI, nsAString& out)
{
@@ -218,22 +207,8 @@ MapURIToAddonID(nsIURI* aURI)
return nullptr;
}
- bool equals;
- nsresult rv;
- if (NS_SUCCEEDED(aURI->SchemeIs("moz-extension", &equals)) && equals) {
- nsCOMPtr<nsIAddonPolicyService> service = do_GetService("@mozilla.org/addons/policy-service;1");
- if (service) {
- nsString addonId;
- rv = service->ExtensionURIToAddonId(aURI, addonId);
- if (NS_FAILED(rv))
- return nullptr;
-
- return ConvertAddonId(addonId);
- }
- }
-
nsAutoString filePath;
- rv = ResolveURI(aURI, filePath);
+ nsresult rv = ResolveURI(aURI, filePath);
if (NS_FAILED(rv))
return nullptr;
@@ -255,4 +230,4 @@ MapURIToAddonID(nsIURI* aURI)
return AddonPathService::FindAddonId(filePath);
}
-} // namespace mozilla
+}