*pressedOK = PR_TRUE;
SINGSIGN_Prompt    (const PRUnichar *text, const PRUnichar *defaultText, PRUnichar **resultText,    const char *urlname, nsIPrompt* dialog, PRBool *returnValue, PRBool strip) {  nsresult res;  nsAutoString data, emptyUsername("");  /* do only the dialog if signon preference is not enabled */  if (!si_GetSignonRememberingPref()){    return dialog->Prompt(text, nsnull /* window title */, resultText, returnValue);  }  /* convert to a uri so we can parse out the hostname */  nsCOMPtr<nsIURL> uri;  nsComponentManager::CreateInstance(kStandardUrlCID, nsnull, NS_GET_IID(nsIURL), (void **) getter_AddRefs(uri));  res = uri->SetSpec(urlname);  if (NS_FAILED(res)) return res;  /* get host part of the uri */  nsXPIDLCString host;  if (strip) {    res = uri->GetHost(getter_Copies(host));    if (NS_FAILED(res)) {      return res;    }  } else {    res = MangleUrl(urlname, getter_Copies(host));    if (NS_FAILED(res)) return res;  }  /* get previous data used with this hostname */  si_RestoreOldSignonDataFromBrowser((const char *)host, PR_TRUE, emptyUsername, data);  /* return if data was found */  if (data.Length() != 0) {    *resultText = data.ToNewUnicode();    *returnValue = 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);    *returnValue = PR_FALSE;    return res;  }  if (checked) {    si_RememberSignonDataFromBrowser ((const char *)host, emptyUsername, nsAutoString(*resultText));  }  /* cleanup and return */  return NS_OK;}