Bug 1484499 - Remove unused nsImapProtocol::CheckNewMail(). r=jorgk
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 09 Sep 2018 15:02:00 +0200
changeset 33122 6e094093b7db6c79d406ddf688e3a73e49e3d102
parent 33121 f0df446fac0b4691c129a3bdff10a9989c4b5221
child 33123 14f5afb1271f69dfcebffaf5c708287fa3c6f462
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1484499
Bug 1484499 - Remove unused nsImapProtocol::CheckNewMail(). r=jorgk
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapProtocol.h
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -469,17 +469,16 @@ nsImapProtocol::nsImapProtocol() : nsMsg
   m_fromHeaderSeen = false;
   m_closeNeededBeforeSelect = false;
   m_needNoop = false;
   m_noopCount = 0;
   m_fetchBodyListIsNew = false;
   m_flagChangeCount = 0;
   m_lastCheckTime = PR_Now();
 
-  m_checkForNewMailDownloadsHeaders = true;  // this should be on by default
   m_hierarchyNameState = kNoOperationInProgress;
   m_discoveryStatus = eContinue;
 
   // m_dataOutputBuf is used by Send Data
   m_dataOutputBuf = (char *) PR_CALLOC(sizeof(char) * OUTPUT_BUFFER_SIZE);
   m_allocatedSize = OUTPUT_BUFFER_SIZE;
 
   // used to buffer incoming data by ReadNextLine
@@ -4446,24 +4445,16 @@ void nsImapProtocol::PeriodicBiff()
 }
 
 void nsImapProtocol::SendSetBiffIndicatorEvent(nsMsgBiffState newState)
 {
     if (m_imapMailFolderSink)
       m_imapMailFolderSink->SetBiffStateAndUpdate(newState);
 }
 
-// We get called to see if there is mail waiting for us at the server, even if it may have been
-// read elsewhere. We just want to know if we should download headers or not.
-
-bool nsImapProtocol::CheckNewMail()
-{
-  return m_checkForNewMailDownloadsHeaders;
-}
-
 /* static */ void nsImapProtocol::LogImapUrl(const char *logMsg, nsIImapUrl *imapUrl)
 {
   if (MOZ_LOG_TEST(IMAP, LogLevel::Info))
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(imapUrl);
     if (mailnewsUrl)
     {
       nsAutoCString urlSpec, unescapedUrlSpec;
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -409,17 +409,16 @@ private:
   void HandleIdleResponses();
   virtual bool ProcessCurrentURL();
   void EstablishServerConnection();
   virtual void ParseIMAPandCheckForNewMail(const char* commandString =
     nullptr, bool ignoreBadNOResponses = false);
   // biff
   void  PeriodicBiff();
   void  SendSetBiffIndicatorEvent(nsMsgBiffState newState);
-  bool  CheckNewMail();
 
   // folder opening and listing header functions
   void FolderHeaderDump(uint32_t *msgUids, uint32_t msgCount);
   void FolderMsgDump(uint32_t *msgUids, uint32_t msgCount, nsIMAPeFetchFields fields);
   void FolderMsgDumpLoop(uint32_t *msgUids, uint32_t msgCount, nsIMAPeFetchFields fields);
   void WaitForPotentialListOfBodysToFetch(uint32_t **msgIdList, uint32_t &msgCount);
   void HeaderFetchCompleted();
   void UploadMessageFromFile(nsIFile* file, const char* mailboxName, PRTime date,
@@ -652,17 +651,16 @@ private:
   int32_t       m_progressCurrentNumber[IMAP_NUMBER_OF_PROGRESS_STRINGS];
   int32_t       m_progressExpectedNumber;
   nsCString     m_lastProgressStringName;
   int32_t       m_lastPercent;
   int64_t       m_lastProgressTime;
   nsCOMPtr<nsIStringBundle> m_bundle;
 
   bool m_notifySearchHit;
-  bool m_checkForNewMailDownloadsHeaders;
   bool m_needNoop;
   bool m_idle;
   bool m_useIdle;
   int32_t m_noopCount;
   bool    m_autoSubscribe, m_autoUnsubscribe, m_autoSubscribeOnOpen;
   bool m_closeNeededBeforeSelect;
   bool m_retryUrlOnError;
   bool m_preferPlainText;