diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-07-23 02:15:22 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-07-23 02:15:22 +0800 |
commit | b0797c8f3de7e0be7c616dc61f8f6323c9f98a98 (patch) | |
tree | f6ba09c7f1ba1119d6120ce84c1c6126bff2246a /embed | |
parent | 8ed863129291204c3b293e41dae4bc3a1c7e9127 (diff) | |
download | gsoc2013-epiphany-b0797c8f3de7e0be7c616dc61f8f6323c9f98a98.tar.gz gsoc2013-epiphany-b0797c8f3de7e0be7c616dc61f8f6323c9f98a98.tar.zst gsoc2013-epiphany-b0797c8f3de7e0be7c616dc61f8f6323c9f98a98.zip |
No need to make proxy PAC configuration public, we only use it in a pref
2004-07-22 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed-single.c:
* embed/ephy-embed-single.h:
* embed/mozilla/mozilla-embed-single.cpp:
* embed/mozilla/mozilla-notifiers.cpp:
No need to make proxy PAC configuration public, we only
use it in a pref notifier.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed-single.c | 15 | ||||
-rw-r--r-- | embed/ephy-embed-single.h | 5 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 19 | ||||
-rw-r--r-- | embed/mozilla/mozilla-notifiers.cpp | 19 |
4 files changed, 16 insertions, 42 deletions
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index c609d3efc..64f72d3a3 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -165,21 +165,6 @@ ephy_embed_single_get_offline_mode (EphyEmbedSingle *single) } /** - * ephy_embed_single_load_proxy_autoconf: - * @single: the #EphyEmbedSingle - * @url: a URL to a PAC file - * - * Sets the address of the PAC file, and loads the proxy configuration from it. - **/ -void -ephy_embed_single_load_proxy_autoconf (EphyEmbedSingle *single, - const char* url) -{ - EphyEmbedSingleIface *iface = EPHY_EMBED_SINGLE_GET_IFACE (single); - iface->load_proxy_autoconf (single, url); -} - -/** * ephy_embed_single_get_font_list: * @single: the #EphyEmbedSingle * @lang_group: a mozilla font language group name, or %NULL diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h index b7b66d13b..68ea108fe 100644 --- a/embed/ephy-embed-single.h +++ b/embed/ephy-embed-single.h @@ -81,10 +81,7 @@ void ephy_embed_single_set_offline_mode (EphyEmbedSingle *single, gboolean ephy_embed_single_get_offline_mode (EphyEmbedSingle *single); -void ephy_embed_single_load_proxy_autoconf (EphyEmbedSingle *single, - const char* url); - -GList *ephy_embed_single_get_font_list (EphyEmbedSingle *single, +GList *ephy_embed_single_get_font_list (EphyEmbedSingle *single, const char *lang_group); G_END_DECLS diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index fb6f644e3..d64397a4c 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -73,7 +73,6 @@ // FIXME: For setting the locale. hopefully gtkmozembed will do itself soon #include <nsIChromeRegistry.h> #include <nsILocaleService.h> -#include <nsIProtocolProxyService.h> #include <nsIHttpAuthManager.h> #include <nsICacheService.h> #include <nsIFontEnumerator.h> @@ -576,23 +575,6 @@ impl_get_offline_mode (EphyEmbedSingle *shell) return isOffline; } -static void -impl_load_proxy_autoconf (EphyEmbedSingle *shell, - const char* url) -{ - g_assert (url != NULL); - - nsCOMPtr<nsIProtocolProxyService> pps = - do_GetService ("@mozilla.org/network/protocol-proxy-service;1"); - if (!pps) return; - -#if MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 2) - pps->ConfigureFromPAC (nsEmbedCString (url)); -#else - pps->ConfigureFromPAC (url); -#endif -} - static GList * impl_get_font_list (EphyEmbedSingle *shell, const char *langGroup) @@ -945,7 +927,6 @@ ephy_embed_single_iface_init (EphyEmbedSingleIface *iface) iface->clear_auth_cache = impl_clear_auth_cache; iface->set_offline_mode = impl_set_offline_mode; iface->get_offline_mode = impl_get_offline_mode; - iface->load_proxy_autoconf = impl_load_proxy_autoconf; iface->get_font_list = impl_get_font_list; iface->open_window = impl_open_window; } diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp index 6b35f37dd..c36cf41a5 100644 --- a/embed/mozilla/mozilla-notifiers.cpp +++ b/embed/mozilla/mozilla-notifiers.cpp @@ -23,6 +23,8 @@ #include "config.h" #endif +#include "mozilla-version.h" + #include "ephy-embed-single.h" #include "ephy-embed-shell.h" #include "mozilla-notifiers.h" @@ -46,6 +48,10 @@ #include <nsIServiceManager.h> #include <libgnome/gnome-i18n.h> +#ifdef ALLOW_PRIVATE_API +#include <nsIProtocolProxyService.h> +#endif + #define MOZILLA_PREF_NO_PROXIES "network.proxy.no_proxies_on" #define MIGRATE_PIXEL_SIZE @@ -354,13 +360,18 @@ mozilla_proxy_autoconfig_notifier (GConfClient *client, GConfEntry *entry, EphyEmbedSingle *single) { - char *url; - - url = eel_gconf_get_string (entry->key); + nsCOMPtr<nsIProtocolProxyService> pps = + do_GetService ("@mozilla.org/network/protocol-proxy-service;1"); + if (!pps) return; + char *url = eel_gconf_get_string (entry->key); if (url && url[0] != '\0') { - ephy_embed_single_load_proxy_autoconf (single, url); +#if MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 2) + pps->ConfigureFromPAC (nsEmbedCString (url)); +#else + pps->ConfigureFromPAC (url); +#endif } g_free (url); |