bug 404726: Addon compatibility check gives many alerts (xpinstall part). r+sr=dveditz
authordtownsend@oxymoronical.com
Thu, 07 Feb 2008 03:54:05 -0800
changeset 11337 5e6100159003d98ff5fe373c018d9611c429960d
parent 11336 135491499d7cc6f7c6a2e507b7efec1d4156fcd4
child 11338 d031fe43fe3db16d5114cb26bd3a19e557df1683
push idunknown
push userunknown
push dateunknown
bugs404726
milestone1.9b4pre
bug 404726: Addon compatibility check gives many alerts (xpinstall part). r+sr=dveditz
xpinstall/src/nsXPInstallManager.cpp
xpinstall/src/nsXPInstallManager.h
--- a/xpinstall/src/nsXPInstallManager.cpp
+++ b/xpinstall/src/nsXPInstallManager.cpp
@@ -112,27 +112,32 @@ nsXPInstallManager::nsXPInstallManager()
 
 
 nsXPInstallManager::~nsXPInstallManager()
 {
     NS_ASSERTION(!mTriggers, "Shutdown not called, triggers still alive");
 }
 
 
-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,
                                           PRUint32 aURLCount,
                                           nsIXPIProgressDialog* aListener)
 {
     return InitManagerWithHashes(aURLs, nsnull, aURLCount, aListener);
 }
@@ -1303,16 +1308,26 @@ nsXPInstallManager::NotifyCertProblem(ns
                                       nsISSLStatus *status,
                                       const nsACString &targetSite,
                                       PRBool *_retval)
 {
     *_retval = PR_TRUE;
     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,
                                     nsISupports* context,
                                     nsresult aStatus,
                                     nsIPrincipal *aPrincipal)
 {
     if (NS_FAILED(aStatus) && aStatus != NS_BINDING_ABORTED) {
--- a/xpinstall/src/nsXPInstallManager.h
+++ b/xpinstall/src/nsXPInstallManager.h
@@ -52,16 +52,17 @@
 #include "nsIXPInstallManager.h"
 #include "nsIXPIDialogService.h"
 #include "nsXPITriggerInfo.h"
 #include "nsIXPIProgressDialog.h"
 #include "nsIChromeRegistry.h"
 #include "nsIDOMWindowInternal.h"
 #include "nsIObserver.h"
 #include "nsIBadCertListener2.h"
+#include "nsISSLErrorListener.h"
 #include "nsIChannelEventSink.h"
 #include "nsIZipReader.h"
 #include "nsIXPIInstallInfo.h"
 
 #include "nsCOMPtr.h"
 
 #include "nsIProgressEventSink.h"
 #include "nsIInterfaceRequestor.h"
@@ -80,16 +81,17 @@
 class nsXPInstallManager : public nsIXPIDialogService,
                            public nsIXPInstallManager,
                            public nsIObserver,
                            public nsIStreamListener,
                            public nsIProgressEventSink,
                            public nsIInterfaceRequestor,
                            public nsPICertNotification,
                            public nsIBadCertListener2,
+                           public nsISSLErrorListener,
                            public nsIChannelEventSink,
                            public nsSupportsWeakReference
 {
     public:
         nsXPInstallManager();
         virtual ~nsXPInstallManager();
 
         NS_DECL_ISUPPORTS
@@ -97,16 +99,17 @@ class nsXPInstallManager : public nsIXPI
         NS_DECL_NSIXPINSTALLMANAGER
         NS_DECL_NSIOBSERVER
         NS_DECL_NSISTREAMLISTENER
         NS_DECL_NSIPROGRESSEVENTSINK
         NS_DECL_NSIREQUESTOBSERVER
         NS_DECL_NSIINTERFACEREQUESTOR
         NS_DECL_NSPICERTNOTIFICATION
         NS_DECL_NSIBADCERTLISTENER2
+        NS_DECL_NSISSLERRORLISTENER
         NS_DECL_NSICHANNELEVENTSINK
 
         NS_IMETHOD InitManager(nsIDOMWindowInternal* aParentWindow, nsXPITriggerInfo* aTrigger, PRUint32 aChromeType );
 
     private:
         nsresult    InitManagerInternal();
         nsresult    InstallItems();
         NS_IMETHOD  DownloadNext();