From bbd2c3d4cf2d76e39aa818cd1add51ea8a4e6cae Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Sun, 17 Aug 2003 05:52:17 +0000 Subject: [PATCH] Don't prompt to save passwords, or prefill passwords, if saving passwords is disabled (bug 216219). --- .../components/passwordmgr/base/nsPasswordManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/components/passwordmgr/base/nsPasswordManager.cpp b/toolkit/components/passwordmgr/base/nsPasswordManager.cpp index 7ac6d6cb49db..44d490504e41 100644 --- a/toolkit/components/passwordmgr/base/nsPasswordManager.cpp +++ b/toolkit/components/passwordmgr/base/nsPasswordManager.cpp @@ -574,6 +574,9 @@ nsPasswordManager::OnStateChange(nsIWebProgress* aWebProgress, !(aStateFlags & nsIWebProgressListener::STATE_STOP)) return NS_OK; + // Don't do anything if the global signon pref is disabled + if (!SingleSignonEnabled()) + return NS_OK; nsCOMPtr domWin; nsresult rv = aWebProgress->GetDOMWindow(getter_AddRefs(domWin)); @@ -713,6 +716,10 @@ nsPasswordManager::Notify(nsIContent* aFormNode, nsIURI* aActionURL, PRBool* aCancelSubmit) { + // Don't do anything if the global signon pref is disabled + if (!SingleSignonEnabled()) + return NS_OK; + // Check the reject list nsCOMPtr uri; aFormNode->GetDocument()->GetDocumentURL(getter_AddRefs(uri)); @@ -1100,7 +1107,7 @@ nsPasswordManager::AutoCompleteSearch(const nsAString& aSearchString, nsIAutoCompleteResult** aResult) { PRInt32 dummy; - if (!mAutoCompleteInputs.Get(aElement, &dummy)) + if (!SingleSignonEnabled() || !mAutoCompleteInputs.Get(aElement, &dummy)) return PR_FALSE; UserAutoComplete* result = nsnull;