diff options
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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 <nsILocalFile.h> #include <nsIURI.h> #include <nsNetUtil.h> +#include <nsIHttpAuthManager.h> // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon #include <nsIChromeRegistry.h> @@ -538,7 +539,6 @@ static void impl_clear_cache (EphyEmbedSingle *shell) { nsresult rv; - nsCOMPtr<nsICacheService> CacheService = do_GetService (NS_CACHESERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED (rv)) @@ -548,6 +548,18 @@ impl_clear_cache (EphyEmbedSingle *shell) } static void +impl_clear_auth_cache (EphyEmbedSingle *shell) +{ + nsresult rv; + nsCOMPtr<nsIHttpAuthManager> 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; |