From a580c810e2ee0b0e6b2ab3c4c721c2a5a67bbde4 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 30 Jun 2008 18:22:04 +0000 Subject: Check for nsIBadCertListener.h. svn path=/branches/gnome-2-22/; revision=8323 --- embed/mozilla/EphyHeaderSniffer.cpp | 4 ++-- embed/mozilla/GtkNSSDialogs.cpp | 10 +++++----- embed/mozilla/GtkNSSDialogs.h | 6 +++--- embed/mozilla/Makefile.am | 9 +++++++-- embed/mozilla/MozDownload.cpp | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index f09a6ee0e..4b2f30424 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -72,7 +72,7 @@ #include "ephy-gui.h" #include "ephy-prefs.h" -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H #include "EphyBadCertRejector.h" #endif #include "MozDownload.h" @@ -224,7 +224,7 @@ EphyHeaderSniffer::OnSecurityChange (nsIWebProgress *aWebProgress, nsIRequest *a NS_IMETHODIMP EphyHeaderSniffer::GetInterface(const nsIID & uuid, void * *result) { -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H if (uuid.Equals (NS_GET_IID (nsIBadCertListener)) && mEmbedPersist) { diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp index 6346ecb83..7f64f9a6c 100644 --- a/embed/mozilla/GtkNSSDialogs.cpp +++ b/embed/mozilla/GtkNSSDialogs.cpp @@ -110,7 +110,7 @@ GtkNSSDialogs::~GtkNSSDialogs () { } -#ifdef HAVE_GECKO_1_9 +#ifndef HAVE_NSIBADCERTLISTENER_H NS_IMPL_THREADSAFE_ISUPPORTS4 (GtkNSSDialogs, nsITokenPasswordDialogs, nsICertificateDialogs, @@ -217,7 +217,7 @@ higgy_setup_dialog (GtkDialog *dialog, const gchar *stock_icon, } } -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H /** * Display a dialog box, showing 'View Certificate', 'Cancel', * and 'Accept' buttons. Optionally a checkbox can be shown, @@ -321,7 +321,7 @@ display_cert_warning_box (nsIInterfaceRequestor *ctx, gtk_widget_destroy (dialog); return res; } -#endif /* HAVE_GECKO_1_9 */ +#endif /* HAVE_NSIBADCERTLISTENER_H */ /* Helper functions */ @@ -389,7 +389,7 @@ GtkNSSDialogs::GetTokenAndSlotFromName (const PRUnichar *aName, return NS_OK; } -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H NS_IMETHODIMP GtkNSSDialogs::ConfirmMismatchDomain (nsIInterfaceRequestor *ctx, @@ -606,7 +606,7 @@ GtkNSSDialogs::NotifyCrlNextupdate (nsIInterfaceRequestor *ctx, return NS_OK; } -#endif /* HAVE_GECKO_1_9 */ +#endif /* HAVE_NSIBADCERTLISTENER_H */ NS_IMETHODIMP GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, diff --git a/embed/mozilla/GtkNSSDialogs.h b/embed/mozilla/GtkNSSDialogs.h index 91e89f370..96eec1da9 100644 --- a/embed/mozilla/GtkNSSDialogs.h +++ b/embed/mozilla/GtkNSSDialogs.h @@ -22,7 +22,7 @@ #ifndef GTKNSSDIALOGS_H #define GTKNSSDIALOGS_H 1 -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H #include #endif #include @@ -40,7 +40,7 @@ class nsIPKCS11Slot; #define GTK_NSSDIALOGS_CLASSNAME "Gtk NSS Dialogs" class GtkNSSDialogs : public nsICertificateDialogs, -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H public nsIBadCertListener, #endif public nsITokenPasswordDialogs, @@ -50,7 +50,7 @@ class GtkNSSDialogs : public nsICertificateDialogs, public: NS_DECL_ISUPPORTS NS_DECL_NSICERTIFICATEDIALOGS -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H NS_DECL_NSIBADCERTLISTENER #endif NS_DECL_NSITOKENPASSWORDDIALOGS diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am index 0491bac8a..234d31f2b 100644 --- a/embed/mozilla/Makefile.am +++ b/embed/mozilla/Makefile.am @@ -64,6 +64,13 @@ libephymozillaembed_la_SOURCES = \ mozilla-notifiers.cpp \ mozilla-notifiers.h +if HAVE_NSIBADCERTLISTENER_H +libephymozillaembed_la_SOURCES += \ + EphyBadCertRejector.cpp \ + EphyBadCertRejector.h \ + $(NULL) +endif + if HAVE_GECKO_1_9 libephymozillaembed_la_SOURCES += \ EphyXULAppInfo.cpp \ @@ -73,8 +80,6 @@ endif if !HAVE_GECKO_1_9 libephymozillaembed_la_SOURCES += \ - EphyBadCertRejector.cpp \ - EphyBadCertRejector.h \ EphyDirectoryProvider.cpp \ EphyDirectoryProvider.h \ $(NULL) diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index 943da0ff8..06fd5834c 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -71,7 +71,7 @@ #include #include -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H #include "EphyBadCertRejector.h" #endif @@ -533,7 +533,7 @@ MozDownload::OnSecurityChange (nsIWebProgress *aWebProgress, nsIRequest *aReques NS_IMETHODIMP MozDownload::GetInterface(const nsIID & uuid, void * *result) { -#ifndef HAVE_GECKO_1_9 +#ifdef HAVE_NSIBADCERTLISTENER_H if (uuid.Equals (NS_GET_IID (nsIBadCertListener)) && mEmbedPersist) { -- cgit v1.2.3