if (*username != NULL) { user = si_GetSpecificUser(URLName, *username, "username");
if (username.Length() != 0) { user = si_GetSpecificUser(URLName, username, nsAutoString("username"));
si_RestoreOldSignonDataFromBrowser    (char* URLName, PRBool pickFirstUser, char** username, char** password) {  si_SignonUserStruct* user;  si_SignonDataStruct* data;  /* get the data from previous time this URL was visited */  si_lock_signon_list();  if (*username != NULL) {    user = si_GetSpecificUser(URLName, *username, "username");  } else {    user = si_GetUser(URLName, pickFirstUser, "username");  }  if (!user) {    /* leave original username and password from caller unchanged */    /* username = 0; */    /* *password = 0; */    si_unlock_signon_list();    return;  }  SI_LoadSignonData(PR_TRUE); /* this destroys "user" so need to recalculate it */  if (*username != NULL) {    user = si_GetSpecificUser(URLName, *username, "username");  } else {    user = si_GetUser(URLName, pickFirstUser, "username");  }  if (!user) {    si_unlock_signon_list();    return;  }  /* restore the data from previous time this URL was visited */  PRInt32 dataCount = LIST_COUNT(user->signonData_list);  for (PRInt32 i=0; i<dataCount; i++) {    data = NS_STATIC_CAST(si_SignonDataStruct*, user->signonData_list->ElementAt(i));    if(PL_strcmp(data->name, "username")==0) {      StrAllocCopy(*username, data->value);    } else if(PL_strcmp(data->name, "password")==0) {      StrAllocCopy(*password, data->value);    }  }  si_unlock_signon_list();}