Bug 472101 Drop nsIMsgIncomingServer::rememberPassword (unneeded option/preference). r/sr=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Mon, 05 Jan 2009 19:35:48 +0000
changeset 1557 dfd0ad267c11220b6b4871693e07209040286856
parent 1556 4931e158775ba96160134fe6a5c680cabe7aeeb4
child 1558 cf03581c50a0bd8cd91b96e89356889118367430
push idunknown
push userunknown
push dateunknown
bugs472101
Bug 472101 Drop nsIMsgIncomingServer::rememberPassword (unneeded option/preference). r/sr=bienvenu
mail/locales/en-US/chrome/messenger/am-server-top.dtd
mailnews/base/ispdata/aol.rdf
mailnews/base/ispdata/dotmac.rdf
mailnews/base/ispdata/gmail.rdf
mailnews/base/ispdata/googlemail.rdf
mailnews/base/prefs/resources/content/AccountWizard.js
mailnews/base/prefs/resources/content/am-server.xul
mailnews/base/public/nsIMsgIncomingServer.idl
mailnews/base/util/nsMsgIncomingServer.cpp
mailnews/mailnews.js
suite/locales/en-US/chrome/mailnews/pref/am-server-top.dtd
--- a/mail/locales/en-US/chrome/messenger/am-server-top.dtd
+++ b/mail/locales/en-US/chrome/messenger/am-server-top.dtd
@@ -5,17 +5,16 @@
 <!ENTITY serverType.label "Server Type:">
 <!ENTITY serverName.label "Server Name:">
 <!ENTITY serverName.accesskey "S">
 <!ENTITY userName.label "User Name:">
 <!ENTITY userName.accesskey "N">
 <!ENTITY port.label "Port:">
 <!ENTITY port.accesskey "P">
 <!ENTITY serverPortDefault.label "Default:">
-<!ENTITY savePassword.label "Save password">
 <!-- LOCALIZATION NOTE (biffStart.label) : translate below 2 line with grammer dependency
         For example, in Japanese cases:
                 biffStart.label "every"
                 biffEnd.label   "minutes for new messages Check"
 -->
 <!ENTITY biffStart.label "Check for new messages every ">
 <!ENTITY biffStart.accesskey "y">
 <!ENTITY biffEnd.label "minutes">
--- a/mailnews/base/ispdata/aol.rdf
+++ b/mailnews/base/ispdata/aol.rdf
@@ -24,17 +24,16 @@
             <NC:hostName>imap.mail.aol.com</NC:hostName>
             <NC:type>imap
             <NC:ServerType-imap>                                                
               <NC:nsIImapIncomingServer>                                        
                 <NC:deleteModel>2</NC:deleteModel>                              
               </NC:nsIImapIncomingServer>                                       
             </NC:ServerType-imap>                                               
             </NC:type>
-            <NC:rememberPassword>false</NC:rememberPassword>
             <NC:offlineSupportLevel>0</NC:offlineSupportLevel>
             <NC:defaultCopiesAndFoldersPrefsToServer>false</NC:defaultCopiesAndFoldersPrefsToServer>
             <NC:canCreateFoldersOnServer>false</NC:canCreateFoldersOnServer>
             <NC:canCompactFoldersOnServer>false</NC:canCompactFoldersOnServer>
             <NC:canUndoDeleteOnServer>false</NC:canUndoDeleteOnServer>
             <NC:canSearchMessages>false</NC:canSearchMessages>
             <NC:canFileMessagesOnServer>false</NC:canFileMessagesOnServer>
             <NC:canEmptyTrashOnExit>false</NC:canEmptyTrashOnExit>
--- a/mailnews/base/ispdata/dotmac.rdf
+++ b/mailnews/base/ispdata/dotmac.rdf
@@ -9,17 +9,16 @@
       <NC:nsIMsgAccount about="domain:mac.com">
 
         <!-- imap server info -->
         <NC:incomingServer>
           <NC:nsIMsgIncomingServer>
             <NC:prettyName>.Mac</NC:prettyName>
             <NC:hostName>mail.mac.com</NC:hostName>
             <NC:type>imap</NC:type>
-            <NC:rememberPassword>true</NC:rememberPassword>
             <NC:port>993</NC:port>
             <NC:socketType>3</NC:socketType>            
           </NC:nsIMsgIncomingServer>
         </NC:incomingServer>
 
         <!-- smtp server info -->
         <NC:smtp>
           <NC:nsISmtpServer>
--- a/mailnews/base/ispdata/gmail.rdf
+++ b/mailnews/base/ispdata/gmail.rdf
@@ -18,17 +18,16 @@
               <NC:nsIImapIncomingServer>
                 <NC:usingSubscription>false</NC:usingSubscription>
                 <!-- IMAP delete model: "remove it immediately". -->
                 <NC:deleteModel>2</NC:deleteModel>
                 <NC:trashFolderName>[Gmail]/Trash</NC:trashFolderName>
               </NC:nsIImapIncomingServer>
             </NC:ServerType-imap>
             <NC:loginAtStartUp>true</NC:loginAtStartUp>
-            <NC:rememberPassword>true</NC:rememberPassword>
             <NC:port>993</NC:port>
             <NC:socketType>3</NC:socketType>
           </NC:nsIMsgIncomingServer>
         </NC:incomingServer>
 
         <!-- SMTP server info -->
         <NC:smtp>
           <NC:nsISmtpServer>
@@ -77,17 +76,16 @@
             <NC:ServerType-pop3>
               <NC:nsIPopIncomingServer>
                 <NC:leaveMessagesOnServer>true</NC:leaveMessagesOnServer>
                 <NC:deleteMailLeftOnServer>false</NC:deleteMailLeftOnServer>
               </NC:nsIPopIncomingServer>
             </NC:ServerType-pop3>
             <NC:loginAtStartUp>true</NC:loginAtStartUp>
             <NC:downloadOnBiff>true</NC:downloadOnBiff>
-            <NC:rememberPassword>true</NC:rememberPassword>
             <NC:port>995</NC:port>
             <NC:socketType>3</NC:socketType>
           </NC:nsIMsgIncomingServer>
         </NC:incomingServer>
 
         <!-- smtp server info -->
         <NC:smtp>
           <NC:nsISmtpServer>
--- a/mailnews/base/ispdata/googlemail.rdf
+++ b/mailnews/base/ispdata/googlemail.rdf
@@ -18,17 +18,16 @@
               <NC:nsIImapIncomingServer>
                 <NC:usingSubscription>false</NC:usingSubscription>
                 <!-- IMAP delete model: "remove it immediately". -->
                 <NC:deleteModel>2</NC:deleteModel>
                 <NC:trashFolderName>[Google Mail]/Trash</NC:trashFolderName>
               </NC:nsIImapIncomingServer>
             </NC:ServerType-imap>
             <NC:loginAtStartUp>true</NC:loginAtStartUp>
-            <NC:rememberPassword>true</NC:rememberPassword>
             <NC:port>993</NC:port>
             <NC:socketType>3</NC:socketType>
           </NC:nsIMsgIncomingServer>
         </NC:incomingServer>
 
         <!-- SMTP server info -->
         <NC:smtp>
           <NC:nsISmtpServer>
@@ -77,17 +76,16 @@
             <NC:ServerType-pop3>
               <NC:nsIPopIncomingServer>
                 <NC:leaveMessagesOnServer>true</NC:leaveMessagesOnServer>
                 <NC:deleteMailLeftOnServer>false</NC:deleteMailLeftOnServer>
               </NC:nsIPopIncomingServer>
             </NC:ServerType-pop3>
             <NC:loginAtStartUp>true</NC:loginAtStartUp>
             <NC:downloadOnBiff>true</NC:downloadOnBiff>
-            <NC:rememberPassword>true</NC:rememberPassword>
             <NC:port>995</NC:port>
             <NC:socketType>3</NC:socketType>
           </NC:nsIMsgIncomingServer>
         </NC:incomingServer>
 
         <!-- smtp server info -->
         <NC:smtp>
           <NC:nsISmtpServer>
--- a/mailnews/base/prefs/resources/content/AccountWizard.js
+++ b/mailnews/base/prefs/resources/content/AccountWizard.js
@@ -299,17 +299,16 @@ function AccountDataToPageData(accountDa
             setPageData(pageData, "server", "servertype", server.type);
             setPageData(pageData, "server", "hostname", server.hostName);
         }
         setPageData(pageData, "accounttype", "otheraccount", false);
     }
     
     setPageData(pageData, "login", "username", server.username);
     setPageData(pageData, "login", "password", server.password);
-    setPageData(pageData, "login", "rememberPassword", server.rememberPassword);
     setPageData(pageData, "accname", "prettyName", server.prettyName);
     setPageData(pageData, "accname", "userset", false);
     setPageData(pageData, "ispdata", "supplied", false);
     
     var identity;
     
     if (accountData.identity) {
         dump("This is an accountdata\n");
@@ -366,25 +365,23 @@ function PageDataToAccountData(pageData,
         accountData.pop3.deferredToAccount = localFoldersAccount.key;
         accountData.pop3.deferGetNewMail = true;
         server["ServerType-pop3"] = accountData.pop3;
       }
       catch (ex) {dump ("exception setting up deferred account" + ex);}
     }
     if (serverIsNntp(pageData)) {
         // this stuff probably not relevant
-        dump("not setting username/password/rememberpassword/etc\n");
+        dump("not setting username/password/etc\n");
     } else {
         if (pageData.login) {
             if (pageData.login.username)
                 server.username = pageData.login.username.value;
             if (pageData.login.password)
                 server.password = pageData.login.password.value;
-            if (pageData.login.rememberPassword)
-                server.rememberPassword = pageData.login.rememberPassword.value;
             if (pageData.login.smtpusername)
                 smtp.username = pageData.login.smtpusername.value;
         }
 
         dump("pageData.server = " + pageData.server + "\n");
         if (pageData.server) {
             dump("pageData.server.smtphostname.value = " + pageData.server.smtphostname + "\n");
             if (pageData.server.smtphostname &&
--- a/mailnews/base/prefs/resources/content/am-server.xul
+++ b/mailnews/base/prefs/resources/content/am-server.xul
@@ -147,20 +147,16 @@
     <vbox align="start">
     <checkbox wsm_persist="true"
               id="server.loginAtStartUp" 
               label="&loginAtStartup.label;"
               accesskey="&loginAtStartup.accesskey;"
               prefattribute="value"
               prefstring="mail.server.%serverkey%.login_at_startup"/>
   </vbox>
-<!--
-  <checkbox wsm_persist="true" id="server.rememberPassword" hidefor="nntp"
-            value="&savePassword.label;"/>
--->
   <hbox align="center">
     <checkbox wsm_persist="true" id="server.doBiff" label="&biffStart.label;"
               accesskey="&biffStart.accesskey;"
               oncommand="onCheckItem('server.biffMinutes', 'server.doBiff');"
               prefattribute="value"
               prefstring="mail.server.%serverkey%.check_new_mail"/>
     <textbox wsm_persist="true" id="server.biffMinutes" size="3"
              aria-labelledby="server.doBiff server.biffMinutes biffEnd"
--- a/mailnews/base/public/nsIMsgIncomingServer.idl
+++ b/mailnews/base/public/nsIMsgIncomingServer.idl
@@ -52,17 +52,17 @@ interface nsIMsgDBHdr;
 interface nsILocalFile;
 
 /*
  * Interface for incoming mail/news host
  * this is the base interface for all mail server types (imap, pop, nntp, etc)
  * often you will want to add extra interfaces that give you server-specific
  * attributes and methods.
  */
-[scriptable, uuid(390a2348-3e04-48ac-b7ca-0534e7803d06)]
+[scriptable, uuid(5e1ca141-1bf4-4058-a24a-f83c55c55bf1)]
 interface nsIMsgIncomingServer : nsISupports {
 
   /**
    * internal pref key - guaranteed to be unique across all servers
    */
   attribute ACString key;
 
   /**
@@ -113,19 +113,16 @@ interface nsIMsgIncomingServer : nsISupp
    * as "mailbox", "imap", or "news"
    * used to construct URIs
    */
   readonly attribute ACString localStoreType;
 
   // Perform specific tasks (reset flags, remove files, etc) for account user/server name changes.
   void onUserOrHostNameChanged(in ACString oldName, in ACString newName);
   
-  /* should we remember the password? */
-  attribute boolean rememberPassword;
-
   /* cleartext version of the password */
   attribute ACString password;
 
   /* prompt the user for a password */
   ACString getPasswordWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow, out boolean okayValue);
 
   /* forget the password in memory and in single signon database */
   void forgetPassword();
--- a/mailnews/base/util/nsMsgIncomingServer.cpp
+++ b/mailnews/base/util/nsMsgIncomingServer.cpp
@@ -672,27 +672,17 @@ nsMsgIncomingServer::ToString(nsAString&
   aResult.Append(NS_ConvertASCIItoUTF16(m_serverKey));
   aResult.AppendLiteral("]");
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgIncomingServer::SetPassword(const nsACString& aPassword)
 {
   m_password = aPassword;
-
-  nsresult rv;
-  PRBool rememberPassword = PR_FALSE;
-
-  rv = GetRememberPassword(&rememberPassword);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (rememberPassword)
-    rv = StorePassword();
-
-  return rv;
+  return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgIncomingServer::GetPassword(nsACString& aPassword)
 {
   aPassword = m_password;
   return NS_OK;
 }
 
@@ -906,45 +896,28 @@ nsMsgIncomingServer::GetLocalPath(nsILoc
 NS_IMETHODIMP
 nsMsgIncomingServer::SetLocalPath(nsILocalFile *aLocalPath)
 {
   NS_ENSURE_ARG_POINTER(aLocalPath);
   aLocalPath->Create(nsIFile::DIRECTORY_TYPE, 0755);
   return SetFileValue("directory-rel", "directory", aLocalPath);
 }
 
-NS_IMETHODIMP
-nsMsgIncomingServer::SetRememberPassword(PRBool value)
-{
-  if (!value)
-    ForgetPassword();
-  else
-    StorePassword();
-  return SetBoolValue("remember_password", value);
-}
-
 PRBool nsMsgIncomingServer::PasswordProtectLocalCache()
 {
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   NS_ENSURE_TRUE(prefs, PR_FALSE);
 
   PRBool passwordProtectLocalCache;
   nsresult rv = prefs->GetBoolPref( "mail.password_protect_local_cache", &passwordProtectLocalCache);
   NS_ENSURE_SUCCESS(rv, PR_FALSE);
   return passwordProtectLocalCache;
 }
 
 NS_IMETHODIMP
-nsMsgIncomingServer::GetRememberPassword(PRBool* aValue)
-{
-  NS_ENSURE_ARG_POINTER(aValue);
-  return GetBoolValue("remember_password", aValue);
-}
-
-NS_IMETHODIMP
 nsMsgIncomingServer::GetLocalStoreType(nsACString& aResult)
 {
   NS_NOTYETIMPLEMENTED("nsMsgIncomingServer superclass not implementing GetLocalStoreType!");
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetAccountManagerChrome(nsAString& aResult)
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -171,17 +171,16 @@ pref("mail.correct_threading",          
 pref("mail.leave_on_server",                false);
 pref("mail.default_cc",                     "");
 pref("mail.default_fcc",                    ""); // maibox:URL or Imap://Host/OnLineFolderName
 pref("mail.check_new_mail",                 false);
 pref("mail.pop3_gets_new_mail",             false);
 pref("mail.check_time",                     10);
 pref("mail.pop_name",                       "");
 pref("mail.pop3.deleteFromServerOnMove",    false);
-pref("mail.remember_password",              false);
 pref("mail.pop_password",                   "");
 pref("mail.fixed_width_messages",           true);
 pref("mail.citation_color",                 "#000000"); // quoted color
 pref("mail.quoted_style",                   0); // 0=plain, 1=bold, 2=italic, 3=bolditalic
 pref("mail.quoted_size",                    0); // 0=normal, 1=big, 2=small
 pref("mail.quoted_graphical",               true); // use HTML-style quoting for displaying plain text
 pref("mail.quoteasblock",                   true); // use HTML-style quoting for quoting plain text
 pref("mail.identity.organization",          "");
--- a/suite/locales/en-US/chrome/mailnews/pref/am-server-top.dtd
+++ b/suite/locales/en-US/chrome/mailnews/pref/am-server-top.dtd
@@ -5,17 +5,16 @@
 <!ENTITY serverType.label "Server Type:">
 <!ENTITY serverName.label "Server Name:">
 <!ENTITY serverName.accesskey "S">
 <!ENTITY userName.label "User Name:">
 <!ENTITY userName.accesskey "N">
 <!ENTITY port.label "Port:">
 <!ENTITY port.accesskey "P">
 <!ENTITY serverPortDefault.label "Default:">
-<!ENTITY savePassword.label "Save password">
 <!-- LOCALIZATION NOTE (biffStart.label) : translate below 2 line with grammer dependency
         For example, in Japanese cases:
                 biffStart.label "every"
                 biffEnd.label   "minutes for new messages Check"
 -->
 <!ENTITY biffStart.label "Check for new messages every ">
 <!ENTITY biffStart.accesskey "y">
 <!ENTITY biffEnd.label "minutes">