From fd5fbf7d8997e7b7be5cefbbbb4987abb654aa59 Mon Sep 17 00:00:00 2001 From: "morse%netscape.com" Date: Thu, 30 Sep 1999 01:18:03 +0000 Subject: [PATCH] fix bugs 14672 (dead code in wallet) and part of bug 15169 (wallet pref not needed) -- reviewed pnunn git-svn-id: svn://10.0.0.236/trunk@49381 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/wallet/src/wallet.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index bcdefcedf46..cd9dea88be3 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -555,6 +555,7 @@ PRIVATE PRBool wallet_captureForms = PR_FALSE; PRIVATE PRBool wallet_Notified = PR_FALSE; PRIVATE char * wallet_Server = nsnull; +#ifdef AutoCapture PRIVATE void wallet_SetFormsCapturingPref(PRBool x) { @@ -597,6 +598,7 @@ wallet_GetFormsCapturingPref(void) wallet_RegisterCapturePrefCallbacks(); return wallet_captureForms; } +#endif PRIVATE void wallet_SetWalletNotificationPref(PRBool x) { @@ -1763,8 +1765,6 @@ wallet_ReadFromURLFieldToSchemaFile if (NS_FAILED(wallet_GetLine(strm, aItem1, PR_FALSE))) { /* end of file reached */ break; - strm.close(); - return; } if (aItem1->Length()==0) { @@ -3059,8 +3059,11 @@ WLLT_RequestToCapture(nsIPresShell* shell) { } /* save form if it meets all necessary conditions */ +#ifdef AutoCapture if (wallet_GetFormsCapturingPref() && (count>=3)) { - +#else + if (count>=3) { +#endif /* conditions all met, now save it */ for (PRUint32 elementY = 0; elementY < numElements; elementY++) { nsIDOMNode* elementNode = nsnull; @@ -3201,7 +3204,7 @@ WLLT_OnSubmit(nsIContent* formNode) { SINGSIGN_RememberSignonData (URLName, (char**)name_array, (char**)value_array, (char**)type_array, value_cnt); -#ifndef AutoCaputure +#ifndef AutoCapture /* give notification if this is first significant form submitted */ if ((count>=3) && !wallet_GetWalletNotificationPref()) {