nsAutoString realm; CopyASCIItoUCS2(nsLiteralCString(passwordRealm), realm);
si_DoDialogIfPrefIsOff(    const PRUnichar *dialogTitle,    const PRUnichar *text,    PRUnichar **user,    PRUnichar **pwd,    const PRUnichar *defaultText,    PRUnichar **resultText,    const char *passwordRealm,    nsIPrompt* dialog,    PRBool *pressedOK,     PRUint32 savePassword,    DialogType dlg) {  nsresult res;  nsAutoString realm;  CopyASCIItoUCS2(nsLiteralCString(passwordRealm), realm);  const PRUnichar * prompt_string = dialogTitle;  if (dialogTitle == nsnull || nsCRT::strlen(dialogTitle) == 0) {    prompt_string = Wallet_Localize("PromptForData");  }  switch (dlg) {    case promptUsernameAndPassword:      res = dialog->PromptUsernameAndPassword(prompt_string,                                              text,                                              user,                                              pwd,                                              nsnull, nsnull,                                              pressedOK);      break;    case promptPassword:      res = dialog->PromptPassword(prompt_string,                                   text,                                   pwd,                                   nsnull, nsnull,                                   pressedOK);      break;    case prompt:      res = dialog->Prompt(prompt_string,                           text,                           resultText,                           nsnull, nsnull,                           pressedOK);#ifdef DEBUG      break;    default:      NS_ASSERTION(PR_FALSE, "Undefined DialogType in si_DoDialogIfPrefIsOff");#endif  }  if (dialogTitle != prompt_string) {    Recycle(NS_CONST_CAST(PRUnichar*, prompt_string));  }  return res;}