Comment 17 for bug 875266

Comment on attachment 577534
gsettings proxy patch v2

>+ obj->SetData(nsCString(*p_gs_strings));

nsDependentCString is more conventional here.

>-static bool GConfIgnoreHost(const nsACString& aIgnore,
>- const nsACString& aHost)
>+static PRBool HostIgnoredByProxy(const nsACString& aIgnore,
>+ const nsACString& aHost)

We now use bool/true/false.

>+ nsDependentCSubstring aIgnoreStripped(start, slash);

The a- prefix on variables is used for parameters (arguments).
As this is not a parameter, so call it "ignoreStripped".

(In reply to Karl Tomlinson (:karlt) from comment #11)
> >+ if (mGConf && IsProxyMode("auto")) {
> >+ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
> >+ aResult);
> > }
> >+ if (mGSettings) {
> >+ // Check if mode is auto
> I assume GSettings should override GConf settings.
> Otherwise I assume those who upgrade to GNOME 3 will still be using their old
> GConf settings, but the configuration utility will change the GSettings
> values.

The existance of GSettings does not imply that gsettings-desktop-schemas is
installed, but, if there is an org.gnome.system.proxy schema, and mode is not
auto, then best to respect the desktop-schemas settings by not falling back to
GConf here.

>+ if (mGSettings)
>+ return GetProxyFromGSettings(scheme, host, port, aResult);
>+ else
>+ return GetProxyFromGConf(scheme, host, port, aResult);

Also here, best to fall back to GConf if org.gnome.system.proxy does not