# HG changeset patch # User Alex Henrie # Date 1425704794 25200 # Fri Mar 06 22:06:34 2015 -0700 # Node ID 7421abd87f753042bfe4f26c7cff1ebb0d047cef # Parent 43fb1f92e8d41f1dc086b336532d9fa5720b6475 Bug 1134537 - Only support GIO in nsIOService. diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -434,17 +434,17 @@ nsIOService::GetProtocolHandler(const ch ToLowerCase(contractID); rv = CallGetService(contractID.get(), result); if (NS_SUCCEEDED(rv)) { CacheProtocolHandler(scheme, *result); return rv; } -#ifdef MOZ_X11 +#ifdef MOZ_ENABLE_GIO // check to see whether GVFS can handle this URI scheme. if it can // create a nsIURI for the "scheme:", then we assume it has support for // the requested protocol. otherwise, we failover to using the default // protocol handler. rv = CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"moz-gio", result); if (NS_SUCCEEDED(rv)) { @@ -455,40 +455,16 @@ nsIOService::GetProtocolHandler(const ch rv = (*result)->NewURI(spec, nullptr, nullptr, &uri); if (NS_SUCCEEDED(rv)) { NS_RELEASE(uri); return rv; } NS_RELEASE(*result); } - - // check to see whether GnomeVFS can handle this URI scheme. if it can - // create a nsIURI for the "scheme:", then we assume it has support for - // the requested protocol. otherwise, we failover to using the default - // protocol handler. - - // XXX should this be generalized into something that searches a - // category? (see bug 234714) - - rv = CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"moz-gnomevfs", - result); - if (NS_SUCCEEDED(rv)) { - nsAutoCString spec(scheme); - spec.Append(':'); - - nsIURI *uri; - rv = (*result)->NewURI(spec, nullptr, nullptr, &uri); - if (NS_SUCCEEDED(rv)) { - NS_RELEASE(uri); - return rv; - } - - NS_RELEASE(*result); - } #endif } // Okay we don't have a protocol handler to handle this url type, so use // the default protocol handler. This will cause urls to get dispatched // out to the OS ('cause we can't do anything with them) when we try to // read from a channel created by the default protocol handler.