Bug 1519630 - Remove deprecated nsIMsgFolder.prettiestName. r=aceman
authorJorg K <jorgk@jorgk.com>
Sat, 12 Jan 2019 13:20:54 +0100
changeset 34172 7edaf941a3beca1b37c1797462456fe3cf92b6b4
parent 34171 0fb460d27117da21b5ee2bb36d51ab9c321be263
child 34173 1275fb1bcae3362c0d768131cb707a7963ab0618
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersaceman
bugs1519630
Bug 1519630 - Remove deprecated nsIMsgFolder.prettiestName. r=aceman
mailnews/base/public/nsIMsgFolder.idl
mailnews/base/util/nsMsgDBFolder.cpp
--- a/mailnews/base/public/nsIMsgFolder.idl
+++ b/mailnews/base/public/nsIMsgFolder.idl
@@ -37,17 +37,16 @@ interface nsIMsgFolder : nsISupports {
   const nsMsgBiffState nsMsgBiffState_NoMail =  1; // No new mail is waiting.
   const nsMsgBiffState nsMsgBiffState_Unknown = 2; // We dunno whether there is new mail.
 
   /* folder name properties */
   readonly attribute ACString URI;
   attribute AString name;
   attribute AString prettyName;
   readonly attribute AString abbreviatedName;
-  /* @deprecated */ readonly attribute AString prettiestName;
 
   attribute nsIMsgFolder parent;
 
   /// Returns an enumerator containing the messages within the current database.
   readonly attribute nsISimpleEnumerator messages;
 
   void startFolderLoading();
   void endFolderLoading();
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -63,17 +63,16 @@
 #include "nsMsgLocalFolderHdrs.h"
 #define oneHour 3600000000U
 #include "nsMsgUtils.h"
 #include "nsIMsgFilterService.h"
 #include "nsDirectoryServiceUtils.h"
 #include "mozilla/Services.h"
 #include "nsMimeTypes.h"
 #include "nsIMsgFilter.h"
-#include "nsIConsoleService.h"
 #include "nsIScriptError.h"
 #include "mozilla/intl/LocaleService.h"
 #include "nsIURIMutator.h"
 
 static PRTime gtimeOfLastPurgeCheck;  // variable to know when to check for purge threshold
 
 #define PREF_MAIL_PROMPT_PURGE_THRESHOLD "mail.prompt_purge_threshhold"
 #define PREF_MAIL_PURGE_THRESHOLD "mail.purge_threshhold"
@@ -3577,42 +3576,16 @@ NS_IMETHODIMP nsMsgDBFolder::GetChildWit
         if (*child)
           return NS_OK;
       }
     }
   }
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgDBFolder::GetPrettiestName(nsAString& name)
-{
-  if (NS_IsMainThread()) {
-    nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
-
-    if (cs) {
-      nsCString msg(__FUNCTION__);
-      msg.AppendLiteral(" is deprecated and will be removed soon.");
-
-      nsCOMPtr<nsIScriptError> e = do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
-      if (e && NS_SUCCEEDED(e->Init(NS_ConvertUTF8toUTF16(msg), EmptyString(),
-                                    EmptyString(), 0, 0,
-                                    nsIScriptError::warningFlag, "mailnews",
-                                    false))) {
-        cs->LogMessage(e);
-      }
-    }
-  }
-  NS_WARNING("You are trying to use the deprecated attribute 'prettiestName'.");
-
-  if (NS_SUCCEEDED(GetPrettyName(name)))
-    return NS_OK;
-  return GetName(name);
-}
-
-
 NS_IMETHODIMP nsMsgDBFolder::GetShowDeletedMessages(bool *showDeletedMessages)
 {
   NS_ENSURE_ARG_POINTER(showDeletedMessages);
   *showDeletedMessages = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::Delete()