From 3f67e90cfa7f36276d0b7b11f1bceb912aa01711 Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Sun, 26 Mar 2000 08:05:46 +0000 Subject: [PATCH] small changes to clients of string converting APIs git-svn-id: svn://10.0.0.236/trunk@64156 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/wallet/src/singsign.cpp | 15 ++++++++++----- mozilla/uriloader/base/nsURILoader.cpp | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mozilla/extensions/wallet/src/singsign.cpp b/mozilla/extensions/wallet/src/singsign.cpp index 736b317cec4..d7368552a2a 100644 --- a/mozilla/extensions/wallet/src/singsign.cpp +++ b/mozilla/extensions/wallet/src/singsign.cpp @@ -1205,7 +1205,11 @@ si_GetURLAndUserForChangeForm(nsAutoString password) /* passwords match so add entry to list */ /* consider first data node to be the identifying item */ data = (si_SignonDataStruct *) (user->signonData_list->ElementAt(0)); - nsAutoString temp = nsAutoString(url->URLName) + ":" + data->value; + + nsAutoString temp = nsAutoString(url->URLName); + temp.Append(":"); + temp.Append(data->value); + *list2 = temp.ToNewUnicode(); list2++; *(users2++) = user; @@ -1791,7 +1795,7 @@ SI_LoadSignonData(PRBool fullLoad) { if (NS_FAILED(si_ReadLine(strmu, strmp, format, fullLoad, 0, 0, PR_TRUE))) { return -1; } - if (format != HEADER_VERSION_1) { + if (!format.Equals(HEADER_VERSION_1)) { /* something's wrong */ return -1; } @@ -2326,7 +2330,8 @@ SINGSIGN_RestoreSignonData (char* URLName, PRUnichar* name, PRUnichar** value, P * first character position */ if (*name == '\\') { - correctedName = nsAutoString('\\') + name; + correctedName = nsAutoString('\\'); + correctedName.Append(name); } else { correctedName = name; } @@ -2476,9 +2481,9 @@ si_RestoreOldSignonDataFromBrowser PRInt32 dataCount = LIST_COUNT(user->signonData_list); for (PRInt32 i=0; isignonData_list->ElementAt(i)); - if(data->name == USERNAMEFIELD) { + if(data->name.Equals(USERNAMEFIELD)) { username = data->value; - } else if(data->name == PASSWORDFIELD) { + } else if(data->name.Equals(PASSWORDFIELD)) { password = data->value; } } diff --git a/mozilla/uriloader/base/nsURILoader.cpp b/mozilla/uriloader/base/nsURILoader.cpp index 76998db54f3..ab24aa0f7c9 100644 --- a/mozilla/uriloader/base/nsURILoader.cpp +++ b/mozilla/uriloader/base/nsURILoader.cpp @@ -370,9 +370,9 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIChannel * aChannel, nsISupports PRBool bAbortProcess = PR_FALSE; nsCAutoString contentTypeToUse; if (desiredContentType) - contentTypeToUse = desiredContentType; + contentTypeToUse.Assign(desiredContentType); else - contentTypeToUse = contentType; + contentTypeToUse.Assign(contentType); // We need to first figure out if we are retargeting the load to a content listener // that is different from the one that originated the request....if so, set