*returnValue = PR_FALSE; return res;
*pressedOK = PR_FALSE; return NS_OK;
SINGSIGN_PromptPassword    (const PRUnichar *text, PRUnichar **pwd, const char *urlname,    nsIPrompt* dialog, PRBool *returnValue, PRBool strip) {  nsresult res;  nsAutoString password, username;  /* do only the dialog if signon preference is not enabled */  if (!si_GetSignonRememberingPref()){    return dialog->PromptPassword(text, nsnull /* window title */, pwd, returnValue);  }  /* convert to a uri so we can parse out the username and 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;  /* uri is of the form <scheme>://<username>:<password>@<host>:<portnumber>/<pathname>) */  /* 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;  }  /* extract username from uri -- note: prehost is <username>:<password> */  if (strip) {	  nsXPIDLCString prehostCString;	  res = uri->GetPreHost(getter_Copies(prehostCString));	  if (NS_FAILED(res)) {	    return res;	  }	  nsAutoString prehost = nsAutoString((const char *)prehostCString);	  PRInt32 colon = prehost.FindChar(':');	  if (colon == -1) {	    username = prehost;	  } else {	    prehost.Left(username, colon);  	  }  }  /* get previous password used with this username, pick first user if no username found */  si_RestoreOldSignonDataFromBrowser((const char *)host, (username.Length() == 0), username, password);  /* return if a password was found */  if (password.Length() != 0) {    *pwd = password.ToNewUnicode();    *returnValue = PR_TRUE;    return NS_OK;  }  /* no password found, get new password from user */  *pwd = password.ToNewUnicode();  PRBool checked = PR_FALSE;  res = si_CheckGetPassword(pwd, text, &checked);  if (NS_FAILED(res)) {    /* user pressed Cancel */    PR_FREEIF(*pwd);    *returnValue = PR_FALSE;    return res;  }  if (checked) {    si_RememberSignonDataFromBrowser ((const char *)host, username, nsAutoString(*pwd));  }  /* cleanup and return */  return NS_OK;}