Bug 92979 - Remove unused parameters in nsNetUtil.h methods. r=biesi

This commit is contained in:
Cykesiopka 2013-03-08 08:30:13 -05:00
parent 6b994e4b06
commit c4d44d38d7
4 changed files with 10 additions and 18 deletions

View File

@ -561,8 +561,7 @@ SendPing(void *closure, nsIContent *content, nsIURI *uri, nsIIOService *ios)
NS_NAMED_LITERAL_CSTRING(uploadData, "Content-Length: 0\r\n\r\n");
nsCOMPtr<nsIInputStream> uploadStream;
NS_NewPostDataStream(getter_AddRefs(uploadStream), false,
uploadData, 0);
NS_NewPostDataStream(getter_AddRefs(uploadStream), false, uploadData);
if (!uploadStream)
return;

View File

@ -284,8 +284,7 @@ NS_OpenURI(nsIStreamListener *listener,
inline nsresult
NS_MakeAbsoluteURI(nsACString &result,
const nsACString &spec,
nsIURI *baseURI,
nsIIOService *unused = nullptr)
nsIURI *baseURI)
{
nsresult rv;
if (!baseURI) {
@ -303,8 +302,7 @@ NS_MakeAbsoluteURI(nsACString &result,
inline nsresult
NS_MakeAbsoluteURI(char **result,
const char *spec,
nsIURI *baseURI,
nsIIOService *unused = nullptr)
nsIURI *baseURI)
{
nsresult rv;
nsAutoCString resultBuf;
@ -320,8 +318,7 @@ NS_MakeAbsoluteURI(char **result,
inline nsresult
NS_MakeAbsoluteURI(nsAString &result,
const nsAString &spec,
nsIURI *baseURI,
nsIIOService *unused = nullptr)
nsIURI *baseURI)
{
nsresult rv;
if (!baseURI) {
@ -387,8 +384,7 @@ NS_StringToACE(const nsACString &idn, nsACString &result)
* concept of ports or if there was an error getting the port.
*/
inline int32_t
NS_GetRealPort(nsIURI* aURI,
nsIIOService* ioService = nullptr) // pass in nsIIOService to optimize callers
NS_GetRealPort(nsIURI* aURI)
{
int32_t port;
nsresult rv = aURI->GetPort(&port);
@ -1101,9 +1097,7 @@ NS_BufferOutputStream(nsIOutputStream *aOutputStream,
inline nsresult
NS_NewPostDataStream(nsIInputStream **result,
bool isFile,
const nsACString &data,
uint32_t encodeFlags,
nsIIOService *unused = nullptr)
const nsACString &data)
{
nsresult rv;

View File

@ -120,16 +120,16 @@ main(int argc, char* argv[])
nsCOMPtr<nsIServiceManager> servMan;
NS_InitXPCOM2(getter_AddRefs(servMan), nullptr, nullptr);
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
// first thing to do is create ourselves a stream that
// is to be uploaded.
nsCOMPtr<nsIInputStream> uploadStream;
rv = NS_NewPostDataStream(getter_AddRefs(uploadStream),
true,
nsDependentCString(fileName), // XXX UTF-8
0, ioService);
nsDependentCString(fileName)); // XXX UTF-8
if (NS_FAILED(rv)) return -1;
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
// create our url.
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), uriSpec);

View File

@ -93,8 +93,7 @@ nsHTTPDownloadEvent::Run()
nsCOMPtr<nsIInputStream> uploadStream;
rv = NS_NewPostDataStream(getter_AddRefs(uploadStream),
false,
mRequestSession->mPostData,
0, ios);
mRequestSession->mPostData);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIUploadChannel> uploadChannel(do_QueryInterface(chan));