diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-12-31 02:10:21 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-12-31 02:10:21 +0800 |
commit | e75afc16ed5bb461f2e1a49e052f23e70e47db82 (patch) | |
tree | b105c9bc748b75bbad6de430f37858547049ae67 | |
parent | 69f1a14473f11b9890713a52843b5b8bd465f1f9 (diff) | |
download | gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar.gz gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar.bz2 gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar.lz gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar.xz gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.tar.zst gsoc2013-epiphany-e75afc16ed5bb461f2e1a49e052f23e70e47db82.zip |
Add API to EphyEmbedSingle to clear the HTTP authentication cache.
2003-12-30 Christian Persch <chpe@cvs.gnome.org>
* 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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | embed/ephy-embed-single.c | 13 | ||||
-rw-r--r-- | embed/ephy-embed-single.h | 3 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 15 |
4 files changed, 38 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2003-12-30 Christian Persch <chpe@cvs.gnome.org> + + * 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. + 2003-12-29 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-shell.c: (ephy_embed_shell_get_favicon_cache), diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index 5c3466a21..c9da4cd32 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -97,6 +97,19 @@ ephy_embed_single_clear_cache (EphyEmbedSingle *single) } /** + * ephy_embed_single_clear_auth_cache: + * @single: the #EphyEmbedSingle + * + * Clears the mozilla http authentication cache. + **/ +void +ephy_embed_single_clear_auth_cache (EphyEmbedSingle *single) +{ + EphyEmbedSingleClass *klass = EPHY_EMBED_SINGLE_GET_CLASS (single); + klass->clear_auth_cache (single); +} + +/** * ephy_embed_single_set_offline_mode: * @single: the #EphyEmbedSingle * @offline: whether being off-line diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h index dac415cc1..89c80f3bb 100644 --- a/embed/ephy-embed-single.h +++ b/embed/ephy-embed-single.h @@ -49,6 +49,7 @@ struct EphyEmbedSingleClass /* Methods */ void (* clear_cache) (EphyEmbedSingle *shell); + void (* clear_auth_cache) (EphyEmbedSingle *shell); void (* set_offline_mode) (EphyEmbedSingle *shell, gboolean offline); void (* load_proxy_autoconf) (EphyEmbedSingle *shell, @@ -61,6 +62,8 @@ GType ephy_embed_single_get_type (void); void ephy_embed_single_clear_cache (EphyEmbedSingle *shell); +void ephy_embed_single_clear_auth_cache (EphyEmbedSingle *shell); + void ephy_embed_single_set_offline_mode (EphyEmbedSingle *shell, gboolean offline); 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; |