if (aFileExtensions.IsEmpty()) { rv = thePrefsService->CopyUnicharPref("helpers.global_mime_types_file", getter_Copies(mimeFileName)); if (NS_SUCCEEDED(rv) && !mimeFileName.IsEmpty()) { rv = GetExtensionsAndDescriptionFromMimetypesFile(mimeFileName, aMajorType, aMinorType, aFileExtensions, aDescription); } } } else { rv = NS_ERROR_NOT_AVAILABLE;
LookUpExtensionsAndDescription(const nsAString& aMajorType,                               const nsAString& aMinorType,                               nsAString& aFileExtensions,                               nsAString& aDescription) {  nsresult rv = NS_OK;  nsXPIDLString mimeFileName;  nsCOMPtr<nsIPref> thePrefsService(do_GetService(NS_PREF_CONTRACTID));  if (thePrefsService) {    rv =      thePrefsService->CopyUnicharPref("helpers.private_mime_types_file",                                       getter_Copies(mimeFileName));    if (NS_SUCCEEDED(rv) && !mimeFileName.IsEmpty()) {      rv = GetExtensionsAndDescriptionFromMimetypesFile(mimeFileName,                                                        aMajorType,                                                        aMinorType,                                                        aFileExtensions,                                                        aDescription);    }    if (aFileExtensions.IsEmpty()) {      rv =        thePrefsService->CopyUnicharPref("helpers.global_mime_types_file",                                         getter_Copies(mimeFileName));      if (NS_SUCCEEDED(rv) && !mimeFileName.IsEmpty()) {        rv = GetExtensionsAndDescriptionFromMimetypesFile(mimeFileName,                                                          aMajorType,                                                          aMinorType,                                                          aFileExtensions,                                                          aDescription);      }    }  } else {    rv = NS_ERROR_NOT_AVAILABLE;  }  return rv;}