Bug 1401204 - Get rid of NS_BackgroundInputStream and NS_BackgroundOutputStream, r=valentin

This commit is contained in:
Andrea Marchesini 2017-09-19 17:52:28 +02:00
Родитель f4b8f26ddb
Коммит fd7d739519
2 изменённых файлов: 0 добавлений и 58 удалений

Просмотреть файл

@ -1338,48 +1338,6 @@ NS_NewLocalFileStream(nsIFileStream **result,
return rv;
}
nsresult
NS_BackgroundInputStream(nsIInputStream **result,
nsIInputStream *stream,
uint32_t segmentSize /* = 0 */,
uint32_t segmentCount /* = 0 */)
{
nsresult rv;
nsCOMPtr<nsIStreamTransportService> sts =
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsITransport> inTransport;
rv = sts->CreateInputTransport(stream, int64_t(-1), int64_t(-1),
true, getter_AddRefs(inTransport));
if (NS_SUCCEEDED(rv))
rv = inTransport->OpenInputStream(nsITransport::OPEN_BLOCKING,
segmentSize, segmentCount,
result);
}
return rv;
}
nsresult
NS_BackgroundOutputStream(nsIOutputStream **result,
nsIOutputStream *stream,
uint32_t segmentSize /* = 0 */,
uint32_t segmentCount /* = 0 */)
{
nsresult rv;
nsCOMPtr<nsIStreamTransportService> sts =
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsITransport> inTransport;
rv = sts->CreateOutputTransport(stream, int64_t(-1), int64_t(-1),
true, getter_AddRefs(inTransport));
if (NS_SUCCEEDED(rv))
rv = inTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING,
segmentSize, segmentCount,
result);
}
return rv;
}
nsresult
NS_NewBufferedOutputStream(nsIOutputStream **result,
nsIOutputStream *str,

Просмотреть файл

@ -512,22 +512,6 @@ nsresult NS_NewLocalFileStream(nsIFileStream **result,
int32_t perm = -1,
int32_t behaviorFlags = 0);
// returns the input end of a pipe. the output end of the pipe
// is attached to the original stream. data from the original
// stream is read into the pipe on a background thread.
nsresult NS_BackgroundInputStream(nsIInputStream **result,
nsIInputStream *stream,
uint32_t segmentSize = 0,
uint32_t segmentCount = 0);
// returns the output end of a pipe. the input end of the pipe
// is attached to the original stream. data written to the pipe
// is copied to the original stream on a background thread.
nsresult NS_BackgroundOutputStream(nsIOutputStream **result,
nsIOutputStream *stream,
uint32_t segmentSize = 0,
uint32_t segmentCount = 0);
MOZ_MUST_USE nsresult
NS_NewBufferedInputStream(nsIInputStream **result,
nsIInputStream *str,