From e75afc16ed5bb461f2e1a49e052f23e70e47db82 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 30 Dec 2003 18:10:21 +0000 Subject: Add API to EphyEmbedSingle to clear the HTTP authentication cache. 2003-12-30 Christian Persch * embed/ephy-embed-single.c: (ephy_embed_single_clear_auth_cache): * embed/ephy-embed-single.h: * embed/mozilla/mozilla-embed-single.cpp: Add API to EphyEmbedSingle to clear the HTTP authentication cache. --- embed/mozilla/mozilla-embed-single.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'embed/mozilla/mozilla-embed-single.cpp') diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index f60c60bee..84ace349d 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -75,6 +75,7 @@ #include #include #include +#include // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon #include @@ -538,7 +539,6 @@ static void impl_clear_cache (EphyEmbedSingle *shell) { nsresult rv; - nsCOMPtr CacheService = do_GetService (NS_CACHESERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED (rv)) @@ -547,6 +547,18 @@ impl_clear_cache (EphyEmbedSingle *shell) } } +static void +impl_clear_auth_cache (EphyEmbedSingle *shell) +{ + nsresult rv; + nsCOMPtr AuthManager = + do_GetService (NS_HTTPAUTHMANAGER_CONTRACTID, &rv); + if (NS_SUCCEEDED (rv)) + { + AuthManager->ClearAll(); + } +} + static void impl_set_offline_mode (EphyEmbedSingle *shell, gboolean offline) @@ -892,6 +904,7 @@ static void ephy_embed_single_iface_init (EphyEmbedSingleClass *iface) { iface->clear_cache = impl_clear_cache; + iface->clear_auth_cache = impl_clear_auth_cache; iface->set_offline_mode = impl_set_offline_mode; iface->load_proxy_autoconf = impl_load_proxy_autoconf; iface->get_font_list = impl_get_font_list; -- cgit v1.2.3