if (nsnull != mimeTypesSeen){
if ((mimeTypesSeen != nsnull) && (mimeType != nsnull)) {
void DisplayNoDefaultPluginDialog(const char *mimeType){  nsresult rv;  if (nsnull == mimeTypesSeen) {    mimeTypesSeen = new nsHashtable(NS_MIME_TYPES_HASH_NUM);  }  if (nsnull != mimeTypesSeen){    nsCStringKey key(mimeType);    // if we've seen this mimetype before    if (mimeTypesSeen->Get(&key)) {      // don't display the dialog      return;    }    else {      mimeTypesSeen->Put(&key, (void *) hashValue);    }  }  nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID));  nsCOMPtr<nsIPrompt> prompt(do_GetService(kNetSupportDialogCID));  nsCOMPtr<nsIIOService> io(do_GetService(kIOServiceCID));  nsCOMPtr<nsIStringBundleService> strings(do_GetService(kStringBundleServiceCID));  nsCOMPtr<nsIStringBundle> bundle;  nsCOMPtr<nsIURI> uri;  char *spec = nsnull;  nsILocale* locale = nsnull;  PRInt32 buttonPressed;  PRBool displayDialogPrefValue = PR_FALSE, checkboxState = PR_FALSE;  if (!prefs || !prompt || !io || !strings) {    return;  }  rv = prefs->GetBoolPref("plugin.display_plugin_downloader_dialog",                           &displayDialogPrefValue);  if (NS_SUCCEEDED(rv)) {    // if the pref is false, don't display the dialog    if (!displayDialogPrefValue) {      return;    }  }    // Taken from mozilla\extensions\wallet\src\wallet.cpp  // WalletLocalize().  rv = io->NewURI(PLUGIN_PROPERTIES_URL, nsnull, getter_AddRefs(uri));  if (NS_FAILED(rv)) {    return;  }  rv = uri->GetSpec(&spec);  if (NS_FAILED(rv)) {    nsCRT::free(spec);    return;  }  rv = strings->CreateBundle(spec, locale, getter_AddRefs(bundle));  nsCRT::free(spec);  if (NS_FAILED(rv)) {    return;  }  PRUnichar *titleUni = nsnull;  PRUnichar *messageUni = nsnull;  PRUnichar *checkboxMessageUni = nsnull;  rv = bundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginTitle"),                                  &titleUni);  if (NS_FAILED(rv)) {    goto EXIT_DNDPD;  }  rv = bundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginMessage"),                                  &messageUni);  if (NS_FAILED(rv)) {    goto EXIT_DNDPD;  }  rv = bundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginCheckboxMessage"),                                  &checkboxMessageUni);  if (NS_FAILED(rv)) {    goto EXIT_DNDPD;  }  rv = prompt->UniversalDialog(                               nsnull, /* title message */                               titleUni, /* title text in top line of window */                               messageUni, /* this is the main message */                               checkboxMessageUni, /* This is the checkbox message */                               nsnull, /* first button text, becomes OK by default */                               nsnull, /* second button text, becomes CANCEL by default */                               nsnull, /* third button text */                               nsnull, /* fourth button text */                               nsnull, /* first edit field label */                               nsnull, /* second edit field label */                               nsnull, /* first edit field initial and final value */                               nsnull, /* second edit field initial and final value */                               nsnull,  /* icon: question mark by default */                               &checkboxState, /* initial and final value of checkbox */                               1, /* number of buttons */                               0, /* number of edit fields */                               0, /* is first edit field a password field */                                                              &buttonPressed);  // if the user checked the checkbox, make it so the dialog doesn't  // display again.  if (checkboxState) {    prefs->SetBoolPref("plugin.display_plugin_downloader_dialog",                       !checkboxState);  } EXIT_DNDPD:  nsMemory::Free((void *)titleUni);  nsMemory::Free((void *)messageUni);  nsMemory::Free((void *)checkboxMessageUni);  return;}