From 3b0183d0c5fe0fac101a63a4e1a065dfb23e4f6b Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 21 Sep 2004 12:13:37 +0000 Subject: Simplified nsIContentPolicy API check. 2004-09-21 Christian Persch * configure.ac: * embed/mozilla/EphyContentPolicy.cpp: Simplified nsIContentPolicy API check. --- ChangeLog | 7 +++++++ configure.ac | 8 +++++--- embed/mozilla/EphyContentPolicy.cpp | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0071e6363..ffc567845 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-09-21 Christian Persch + + * configure.ac: + * embed/mozilla/EphyContentPolicy.cpp: + + Simplified nsIContentPolicy API check. + 2004-09-21 Christian Persch * configure.ac: diff --git a/configure.ac b/configure.ac index fc827714e..fc7f60a34 100644 --- a/configure.ac +++ b/configure.ac @@ -253,10 +253,12 @@ AC_COMPILE_IFELSE( nsISupports *arg4; p->ShouldLoad(0,nsnull,nsnull,arg4,nsEmbedCString(),nsnull,nsnull);]] )], - [AC_DEFINE([MOZ_NSICONTENTPOLICY_VARIANT_2],[1],[dummy]) result=2], - [AC_DEFINE([MOZ_NSICONTENTPOLICY_VARIANT_1],[1],[dummy]) result=1]) + [variant=2], + [variant=1]) -AC_MSG_RESULT([variant $result]) +AC_DEFINE_UNQUOTED([MOZ_NSICONTENTPOLICY_VARIANT], [$variant], [Define the nsIContentPolicy API variant]) + +AC_MSG_RESULT([variant $variant]) dnl Changed from char* to nsIURI* in 1.7.4 on 1.7 branch, dnl in 1.8a3 on trunk and on aviary branch diff --git a/embed/mozilla/EphyContentPolicy.cpp b/embed/mozilla/EphyContentPolicy.cpp index 65b26b05b..54a0511a5 100644 --- a/embed/mozilla/EphyContentPolicy.cpp +++ b/embed/mozilla/EphyContentPolicy.cpp @@ -59,7 +59,7 @@ EphyContentPolicy::~EphyContentPolicy() g_slist_free (mSafeProtocols); } -#ifdef MOZ_NSICONTENTPOLICY_VARIANT_2 +#ifdef MOZ_NSICONTENTPOLICY_VARIANT == 2 NS_IMETHODIMP EphyContentPolicy::ShouldLoad(PRUint32 aContentType, nsIURI *aContentLocation, @@ -158,4 +158,4 @@ NS_IMETHODIMP EphyContentPolicy::ShouldProcess(PRInt32 contentType, *_retval = PR_TRUE; return NS_OK; } -#endif /* MOZ_NSICONTENTPOLICY_VARIANT_2 || MOZ_NSICONTENTPOLICY_VARIANT_3 */ +#endif /* MOZ_NSICONTENTPOLICY_VARIANT == 2 */ -- cgit v1.2.3