Comment 5 for bug 727372

Revision history for this message
In , Chris Coulson (chrisccoulson) wrote :

(In reply to comment #1)
> Comment on attachment 517395 [details]
> Use GIO for finding the default handler
>
> nsGIOService::Init() always returns true, so IIUC the presence of
> NS_GIOSERVICE_CONTRACTID indicates the presence of GIO but not necessarily
> GVFS.
> Would it be reasonable to fall back to GConf if
> nsIGIOService::GetAppForURIScheme failed?

I don't think we need to do that. With glib >= 2.28, nsIGIOService::GetAppForURIScheme will work regardless of whether gvfs is present (g_app_info_get_default_for_uri_scheme is implemented independently of the vfs backend).

On older glib versions this was delegated to a gvfs module (which just did the lookup in the legacy gconf settings). If gvfs is missing in this case, falling back to gconf to do the lookup won't help much. Launching will fail straight afterwards even if we do find the handler, as the launch is already done via GIO (with no fallback) and depends on gvfs being present (glib < 2.28)