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