Bug 252609 kill *WithConversion in wallet
r=mvl sr=dveditz
This commit is contained in:
Родитель
646676bba8
Коммит
dc1774bece
|
@ -547,7 +547,7 @@ nsWalletlibService::WALLET_Encrypt (const PRUnichar *text, char **crypt) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsWalletlibService::WALLET_Decrypt (const char *crypt, PRUnichar **text) {
|
||||
nsAutoString cryptAutoString; cryptAutoString.AssignWithConversion(crypt);
|
||||
nsAutoString cryptAutoString; cryptAutoString.AssignASCII(crypt);
|
||||
nsAutoString textAutoString;
|
||||
PRBool rv = ::Wallet_Decrypt(cryptAutoString, textAutoString);
|
||||
*text = ToNewUnicode(textAutoString);
|
||||
|
|
|
@ -1373,7 +1373,7 @@ si_GetURLAndUserForChangeForm(nsIPrompt* dialog, const nsString& password)
|
|||
|
||||
nsAutoString userName;
|
||||
if (NS_SUCCEEDED(si_Decrypt (data->value, userName))) {
|
||||
nsAutoString temp; temp.AssignWithConversion(url->passwordRealm);
|
||||
nsAutoString temp; temp.AssignASCII(url->passwordRealm); // XXX non-ascii realms?
|
||||
temp.AppendLiteral(":");
|
||||
temp.Append(userName);
|
||||
|
||||
|
@ -2546,14 +2546,14 @@ si_RememberSignonDataFromBrowser(const char* passwordRealm, const nsString& user
|
|||
|
||||
nsVoidArray signonData;
|
||||
si_SignonDataStruct data1;
|
||||
data1.name.AssignWithConversion(USERNAMEFIELD);
|
||||
data1.name.AssignLiteral(USERNAMEFIELD);
|
||||
if (NS_FAILED(si_Encrypt(nsAutoString(username), data1.value))) {
|
||||
return;
|
||||
}
|
||||
data1.isPassword = PR_FALSE;
|
||||
signonData.AppendElement(&data1);
|
||||
si_SignonDataStruct data2;
|
||||
data2.name.AssignWithConversion(PASSWORDFIELD);
|
||||
data2.name.AssignLiteral(PASSWORDFIELD);
|
||||
if (NS_FAILED(si_Encrypt(nsAutoString(password), data2.value))) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -450,10 +450,9 @@ Wallet_Localize(const char* genericString) {
|
|||
}
|
||||
|
||||
/* localize the given string */
|
||||
nsAutoString strtmp; strtmp.AssignWithConversion(genericString);
|
||||
const PRUnichar *ptrtmp = strtmp.get();
|
||||
NS_ConvertASCIItoUTF16 strtmp(genericString);
|
||||
PRUnichar *ptrv = nsnull;
|
||||
ret = bundle->GetStringFromName(ptrtmp, &ptrv);
|
||||
ret = bundle->GetStringFromName(strtmp.get(), &ptrv);
|
||||
if (NS_FAILED(ret)) {
|
||||
#ifdef DEBUG
|
||||
printf("cannot get string from name\n");
|
||||
|
@ -1934,15 +1933,14 @@ wallet_StepForwardOrBack
|
|||
/* if we've reached a #text node, append it to accumulated text */
|
||||
nsAutoString siblingNameUCS2;
|
||||
result = elementNode->GetNodeName(siblingNameUCS2);
|
||||
nsCAutoString siblingNameUTF8; siblingNameUTF8.AssignWithConversion(siblingNameUCS2);
|
||||
if (siblingNameUTF8.LowerCaseEqualsLiteral("#text")) {
|
||||
if (siblingNameUCS2.LowerCaseEqualsLiteral("#text")) {
|
||||
nsAutoString siblingValue;
|
||||
result = elementNode->GetNodeValue(siblingValue);
|
||||
text.Append(siblingValue);
|
||||
}
|
||||
|
||||
/* if we've reached a SCRIPT node, don't fetch its siblings */
|
||||
if (siblingNameUTF8.LowerCaseEqualsLiteral("script")) {
|
||||
if (siblingNameUCS2.LowerCaseEqualsLiteral("script")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче