From 0281ec357cf8562c859f2c4a05b73fc5ba10ee59 Mon Sep 17 00:00:00 2001 From: "dtownsend%oxymoronical.com" Date: Thu, 7 Feb 2008 11:54:05 +0000 Subject: [PATCH] bug 404726: Addon compatibility check gives many alerts (xpinstall part). r+sr=dveditz --- xpinstall/src/nsXPInstallManager.cpp | 37 +++++++++++++++++++--------- xpinstall/src/nsXPInstallManager.h | 3 +++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp index abac2e7f426..a16974251fc 100644 --- a/xpinstall/src/nsXPInstallManager.cpp +++ b/xpinstall/src/nsXPInstallManager.cpp @@ -117,17 +117,22 @@ nsXPInstallManager::~nsXPInstallManager() } -NS_IMPL_THREADSAFE_ISUPPORTS10(nsXPInstallManager, - nsIXPIDialogService, - nsIXPInstallManager, - nsIObserver, - nsIStreamListener, - nsIProgressEventSink, - nsIInterfaceRequestor, - nsPICertNotification, - nsIBadCertListener2, - nsIChannelEventSink, - nsISupportsWeakReference) +NS_INTERFACE_MAP_BEGIN(nsXPInstallManager) + NS_INTERFACE_MAP_ENTRY(nsIXPIDialogService) + NS_INTERFACE_MAP_ENTRY(nsIXPInstallManager) + NS_INTERFACE_MAP_ENTRY(nsIObserver) + NS_INTERFACE_MAP_ENTRY(nsIStreamListener) + NS_INTERFACE_MAP_ENTRY(nsIProgressEventSink) + NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) + NS_INTERFACE_MAP_ENTRY(nsPICertNotification) + NS_INTERFACE_MAP_ENTRY(nsIBadCertListener2) + NS_INTERFACE_MAP_ENTRY(nsISSLErrorListener) + NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISupportsWeakReference) +NS_INTERFACE_MAP_END + +NS_IMPL_ADDREF(nsXPInstallManager) +NS_IMPL_RELEASE(nsXPInstallManager) NS_IMETHODIMP nsXPInstallManager::InitManagerFromChrome(const PRUnichar **aURLs, @@ -1308,6 +1313,16 @@ nsXPInstallManager::NotifyCertProblem(nsIInterfaceRequestor *socketInfo, return NS_OK; } +// nsISSLErrorListener methods +NS_IMETHODIMP +nsXPInstallManager::NotifySSLError(nsIInterfaceRequestor *socketInfo, + PRInt32 error, + const nsACString &targetSite, + PRBool *_retval) +{ + *_retval = PR_TRUE; + return NS_OK; +} NS_IMETHODIMP nsXPInstallManager::OnCertAvailable(nsIURI *aURI, diff --git a/xpinstall/src/nsXPInstallManager.h b/xpinstall/src/nsXPInstallManager.h index 5383c42bb8a..2669c52c180 100644 --- a/xpinstall/src/nsXPInstallManager.h +++ b/xpinstall/src/nsXPInstallManager.h @@ -57,6 +57,7 @@ #include "nsIDOMWindowInternal.h" #include "nsIObserver.h" #include "nsIBadCertListener2.h" +#include "nsISSLErrorListener.h" #include "nsIChannelEventSink.h" #include "nsIZipReader.h" #include "nsIXPIInstallInfo.h" @@ -85,6 +86,7 @@ class nsXPInstallManager : public nsIXPIDialogService, public nsIInterfaceRequestor, public nsPICertNotification, public nsIBadCertListener2, + public nsISSLErrorListener, public nsIChannelEventSink, public nsSupportsWeakReference { @@ -102,6 +104,7 @@ class nsXPInstallManager : public nsIXPIDialogService, NS_DECL_NSIINTERFACEREQUESTOR NS_DECL_NSPICERTNOTIFICATION NS_DECL_NSIBADCERTLISTENER2 + NS_DECL_NSISSLERRORLISTENER NS_DECL_NSICHANNELEVENTSINK NS_IMETHOD InitManager(nsIDOMWindowInternal* aParentWindow, nsXPITriggerInfo* aTrigger, PRUint32 aChromeType );