mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 983993, part 2 - Remove unused hash table arguments from the Unix nsOSHelperAppService.
This commit is contained in:
parent
e238035e45
commit
86f527ecb1
@ -30,7 +30,6 @@
|
|||||||
#include "nsNetCID.h"
|
#include "nsNetCID.h"
|
||||||
#include "nsXPCOM.h"
|
#include "nsXPCOM.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "nsHashtable.h"
|
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "nsDirectoryServiceDefs.h"
|
#include "nsDirectoryServiceDefs.h"
|
||||||
#include "nsDirectoryServiceUtils.h"
|
#include "nsDirectoryServiceUtils.h"
|
||||||
@ -77,7 +76,6 @@ nsresult
|
|||||||
nsOSHelperAppService::UnescapeCommand(const nsAString& aEscapedCommand,
|
nsOSHelperAppService::UnescapeCommand(const nsAString& aEscapedCommand,
|
||||||
const nsAString& aMajorType,
|
const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsACString& aUnEscapedCommand) {
|
nsACString& aUnEscapedCommand) {
|
||||||
LOG(("-- UnescapeCommand"));
|
LOG(("-- UnescapeCommand"));
|
||||||
LOG(("Command to escape: '%s'\n",
|
LOG(("Command to escape: '%s'\n",
|
||||||
@ -838,7 +836,6 @@ nsOSHelperAppService::ParseNormalMIMETypesEntry(const nsAString& aEntry,
|
|||||||
nsresult
|
nsresult
|
||||||
nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags) {
|
nsAString& aMozillaFlags) {
|
||||||
@ -852,7 +849,6 @@ nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
// in that order. We want to pick up "soffice" for text/rtf in such cases
|
// in that order. We want to pick up "soffice" for text/rtf in such cases
|
||||||
nsresult rv = DoLookUpHandlerAndDescription(aMajorType,
|
nsresult rv = DoLookUpHandlerAndDescription(aMajorType,
|
||||||
aMinorType,
|
aMinorType,
|
||||||
aTypeOptions,
|
|
||||||
aHandler,
|
aHandler,
|
||||||
aDescription,
|
aDescription,
|
||||||
aMozillaFlags,
|
aMozillaFlags,
|
||||||
@ -860,7 +856,6 @@ nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
rv = DoLookUpHandlerAndDescription(aMajorType,
|
rv = DoLookUpHandlerAndDescription(aMajorType,
|
||||||
aMinorType,
|
aMinorType,
|
||||||
aTypeOptions,
|
|
||||||
aHandler,
|
aHandler,
|
||||||
aDescription,
|
aDescription,
|
||||||
aMozillaFlags,
|
aMozillaFlags,
|
||||||
@ -871,7 +866,6 @@ nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
rv = DoLookUpHandlerAndDescription(aMajorType,
|
rv = DoLookUpHandlerAndDescription(aMajorType,
|
||||||
NS_LITERAL_STRING("*"),
|
NS_LITERAL_STRING("*"),
|
||||||
aTypeOptions,
|
|
||||||
aHandler,
|
aHandler,
|
||||||
aDescription,
|
aDescription,
|
||||||
aMozillaFlags,
|
aMozillaFlags,
|
||||||
@ -881,7 +875,6 @@ nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
rv = DoLookUpHandlerAndDescription(aMajorType,
|
rv = DoLookUpHandlerAndDescription(aMajorType,
|
||||||
NS_LITERAL_STRING("*"),
|
NS_LITERAL_STRING("*"),
|
||||||
aTypeOptions,
|
|
||||||
aHandler,
|
aHandler,
|
||||||
aDescription,
|
aDescription,
|
||||||
aMozillaFlags,
|
aMozillaFlags,
|
||||||
@ -895,7 +888,6 @@ nsOSHelperAppService::LookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
nsresult
|
nsresult
|
||||||
nsOSHelperAppService::DoLookUpHandlerAndDescription(const nsAString& aMajorType,
|
nsOSHelperAppService::DoLookUpHandlerAndDescription(const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags,
|
nsAString& aMozillaFlags,
|
||||||
@ -916,7 +908,6 @@ nsOSHelperAppService::DoLookUpHandlerAndDescription(const nsAString& aMajorType,
|
|||||||
rv = GetHandlerAndDescriptionFromMailcapFile(mailcapFileName,
|
rv = GetHandlerAndDescriptionFromMailcapFile(mailcapFileName,
|
||||||
aMajorType,
|
aMajorType,
|
||||||
aMinorType,
|
aMinorType,
|
||||||
aTypeOptions,
|
|
||||||
aHandler,
|
aHandler,
|
||||||
aDescription,
|
aDescription,
|
||||||
aMozillaFlags);
|
aMozillaFlags);
|
||||||
@ -932,7 +923,6 @@ nsresult
|
|||||||
nsOSHelperAppService::GetHandlerAndDescriptionFromMailcapFile(const nsAString& aFilename,
|
nsOSHelperAppService::GetHandlerAndDescriptionFromMailcapFile(const nsAString& aFilename,
|
||||||
const nsAString& aMajorType,
|
const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags) {
|
nsAString& aMozillaFlags) {
|
||||||
@ -1081,7 +1071,6 @@ nsOSHelperAppService::GetHandlerAndDescriptionFromMailcapFile(const nsAString& a
|
|||||||
rv = UnescapeCommand(Substring(++equal_sign_iter, semicolon_iter),
|
rv = UnescapeCommand(Substring(++equal_sign_iter, semicolon_iter),
|
||||||
aMajorType,
|
aMajorType,
|
||||||
aMinorType,
|
aMinorType,
|
||||||
aTypeOptions,
|
|
||||||
testCommand);
|
testCommand);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
continue;
|
continue;
|
||||||
@ -1302,8 +1291,7 @@ nsOSHelperAppService::GetFromExtension(const nsCString& aFileExt) {
|
|||||||
nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(mimeType);
|
nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(mimeType);
|
||||||
|
|
||||||
mimeInfo->AppendExtension(aFileExt);
|
mimeInfo->AppendExtension(aFileExt);
|
||||||
nsHashtable typeOptions; // empty hash table
|
rv = LookUpHandlerAndDescription(majorType, minorType,
|
||||||
rv = LookUpHandlerAndDescription(majorType, minorType, typeOptions,
|
|
||||||
handler, mailcap_description,
|
handler, mailcap_description,
|
||||||
mozillaFlags);
|
mozillaFlags);
|
||||||
LOG(("Handler/Description results: handler='%s', description='%s', mozillaFlags='%s'\n",
|
LOG(("Handler/Description results: handler='%s', description='%s', mozillaFlags='%s'\n",
|
||||||
@ -1358,7 +1346,6 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
|
|||||||
mimeType.EndReading(end_iter);
|
mimeType.EndReading(end_iter);
|
||||||
|
|
||||||
// XXX FIXME: add typeOptions parsing in here
|
// XXX FIXME: add typeOptions parsing in here
|
||||||
nsHashtable typeOptions;
|
|
||||||
nsresult rv = ParseMIMEType(start_iter, majorTypeStart, majorTypeEnd,
|
nsresult rv = ParseMIMEType(start_iter, majorTypeStart, majorTypeEnd,
|
||||||
minorTypeStart, minorTypeEnd, end_iter);
|
minorTypeStart, minorTypeEnd, end_iter);
|
||||||
|
|
||||||
@ -1373,7 +1360,6 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
|
|||||||
nsAutoString mailcap_description, handler, mozillaFlags;
|
nsAutoString mailcap_description, handler, mozillaFlags;
|
||||||
DoLookUpHandlerAndDescription(majorType,
|
DoLookUpHandlerAndDescription(majorType,
|
||||||
minorType,
|
minorType,
|
||||||
typeOptions,
|
|
||||||
handler,
|
handler,
|
||||||
mailcap_description,
|
mailcap_description,
|
||||||
mozillaFlags,
|
mozillaFlags,
|
||||||
@ -1420,7 +1406,6 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
|
|||||||
if (handler.IsEmpty()) {
|
if (handler.IsEmpty()) {
|
||||||
DoLookUpHandlerAndDescription(majorType,
|
DoLookUpHandlerAndDescription(majorType,
|
||||||
minorType,
|
minorType,
|
||||||
typeOptions,
|
|
||||||
handler,
|
handler,
|
||||||
mailcap_description,
|
mailcap_description,
|
||||||
mozillaFlags,
|
mozillaFlags,
|
||||||
@ -1430,7 +1415,6 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
|
|||||||
if (handler.IsEmpty()) {
|
if (handler.IsEmpty()) {
|
||||||
DoLookUpHandlerAndDescription(majorType,
|
DoLookUpHandlerAndDescription(majorType,
|
||||||
NS_LITERAL_STRING("*"),
|
NS_LITERAL_STRING("*"),
|
||||||
typeOptions,
|
|
||||||
handler,
|
handler,
|
||||||
mailcap_description,
|
mailcap_description,
|
||||||
mozillaFlags,
|
mozillaFlags,
|
||||||
@ -1440,7 +1424,6 @@ nsOSHelperAppService::GetFromType(const nsCString& aMIMEType) {
|
|||||||
if (handler.IsEmpty()) {
|
if (handler.IsEmpty()) {
|
||||||
DoLookUpHandlerAndDescription(majorType,
|
DoLookUpHandlerAndDescription(majorType,
|
||||||
NS_LITERAL_STRING("*"),
|
NS_LITERAL_STRING("*"),
|
||||||
typeOptions,
|
|
||||||
handler,
|
handler,
|
||||||
mailcap_description,
|
mailcap_description,
|
||||||
mozillaFlags,
|
mozillaFlags,
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "nsMIMEInfoImpl.h"
|
#include "nsMIMEInfoImpl.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
|
||||||
class nsHashtable;
|
|
||||||
class nsILineInputStream;
|
class nsILineInputStream;
|
||||||
|
|
||||||
class nsOSHelperAppService : public nsExternalHelperAppService
|
class nsOSHelperAppService : public nsExternalHelperAppService
|
||||||
@ -54,7 +53,6 @@ private:
|
|||||||
static nsresult UnescapeCommand(const nsAString& aEscapedCommand,
|
static nsresult UnescapeCommand(const nsAString& aEscapedCommand,
|
||||||
const nsAString& aMajorType,
|
const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsACString& aUnEscapedCommand);
|
nsACString& aUnEscapedCommand);
|
||||||
static nsresult GetFileLocation(const char* aPrefName,
|
static nsresult GetFileLocation(const char* aPrefName,
|
||||||
const char* aEnvVarName,
|
const char* aEnvVarName,
|
||||||
@ -108,14 +106,12 @@ private:
|
|||||||
|
|
||||||
static nsresult LookUpHandlerAndDescription(const nsAString& aMajorType,
|
static nsresult LookUpHandlerAndDescription(const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags);
|
nsAString& aMozillaFlags);
|
||||||
|
|
||||||
static nsresult DoLookUpHandlerAndDescription(const nsAString& aMajorType,
|
static nsresult DoLookUpHandlerAndDescription(const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags,
|
nsAString& aMozillaFlags,
|
||||||
@ -124,7 +120,6 @@ private:
|
|||||||
static nsresult GetHandlerAndDescriptionFromMailcapFile(const nsAString& aFilename,
|
static nsresult GetHandlerAndDescriptionFromMailcapFile(const nsAString& aFilename,
|
||||||
const nsAString& aMajorType,
|
const nsAString& aMajorType,
|
||||||
const nsAString& aMinorType,
|
const nsAString& aMinorType,
|
||||||
nsHashtable& aTypeOptions,
|
|
||||||
nsAString& aHandler,
|
nsAString& aHandler,
|
||||||
nsAString& aDescription,
|
nsAString& aDescription,
|
||||||
nsAString& aMozillaFlags);
|
nsAString& aMozillaFlags);
|
||||||
|
Loading…
Reference in New Issue
Block a user