PRUnichar * prompt_string = Wallet_Localize("PromptForData");
SINGSIGN_Prompt    (const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *defaultText, PRUnichar **resultText,     const char *passwordRealm, nsIPrompt* dialog, PRBool *pressedOK) {  nsresult res;  nsAutoString data, emptyUsername;  /* do only the dialog if signon preference is not enabled */  if (!si_GetSignonRememberingPref()){    PRUnichar * prompt_string = Wallet_Localize("PromptForData");    nsString realm = NS_ConvertToString(passwordRealm);   // XXX hack    res = dialog->Prompt(dialogTitle, text, realm.GetUnicode(), prompt_string, resultText, pressedOK);    Recycle(prompt_string);    return res;  }  /* get previous data used with this hostname */  si_RestoreOldSignonDataFromBrowser(passwordRealm, PR_TRUE, emptyUsername, data);  /* return if data was found */  if (data.Length() != 0) {    *resultText = data.ToNewUnicode();    *pressedOK = PR_TRUE;    return NS_OK;  }  /* no data found, get new data from user */  *resultText = data.ToNewUnicode();  PRBool checked = PR_FALSE;  res = si_CheckGetData(resultText, text, &checked);  if (NS_FAILED(res)) {    /* user pressed Cancel */    PR_FREEIF(*resultText);    *pressedOK = PR_FALSE;    return NS_OK;  }  if (checked) {    si_RememberSignonDataFromBrowser(passwordRealm, emptyUsername, nsAutoString(*resultText));  }  /* cleanup and return */  *pressedOK = PR_TRUE;  return NS_OK;}