Bug 1399756 - remove trailing spaces in mailnews/local. rs=white-space-only CLOSED TREE
authorJorg K <jorgk@jorgk.com>
Sun, 08 Oct 2017 17:57:10 +0200
changeset 29131 9c0e3022858b6fc0f25c4b9f32563ee143075467
parent 29130 434e56e5ffc732a536ea8e3d426449a9231b85eb
child 29132 076da1348bcce4fc0b579531505709fb0601b790
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhite-space-only
bugs1399756
Bug 1399756 - remove trailing spaces in mailnews/local. rs=white-space-only CLOSED TREE
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsLocalMailFolder.h
mailnews/local/src/nsLocalUndoTxn.cpp
mailnews/local/src/nsLocalUtils.cpp
mailnews/local/src/nsLocalUtils.h
mailnews/local/src/nsMailboxUrl.cpp
mailnews/local/src/nsMovemailIncomingServer.cpp
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsMsgLocalStoreUtils.cpp
mailnews/local/src/nsNoneService.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/local/src/nsPop3Service.h
mailnews/local/src/nsRssService.cpp
mailnews/local/src/nsRssService.h
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -1814,17 +1814,17 @@ nsMsgLocalMailFolder::CopyFolderLocal(ns
   nsresult rv = IsChildOfTrash(&isChildOfTrash);
   if (NS_SUCCEEDED(rv) && isChildOfTrash)
   {
     // do it just for the parent folder (isMoveFolder is true for parent only) if we are deleting/moving a folder tree
     // don't confirm for rss folders.
     if (isMoveFolder)
     {
       // if there's a msgWindow, confirm the deletion
-      if (msgWindow) 
+      if (msgWindow)
       {
 
         bool okToDelete = false;
         ConfirmFolderDeletion(msgWindow, srcFolder, &okToDelete);
         if (!okToDelete)
           return NS_MSG_ERROR_COPY_FOLDER_ABORTED;
       }
       // if we are moving a favorite folder to trash, we should clear the favorites flag
@@ -1892,17 +1892,17 @@ nsMsgLocalMailFolder::CopyFolderLocal(ns
     return rv;
   }
 
   return msgStore->CopyFolder(srcFolder, this, isMoveFolder, msgWindow,
                               aListener, newFolderName);
 }
 
 NS_IMETHODIMP
-nsMsgLocalMailFolder::CopyFileMessage(nsIFile* aFile, 
+nsMsgLocalMailFolder::CopyFileMessage(nsIFile* aFile,
                                       nsIMsgDBHdr *msgToReplace,
                                       bool isDraftOrTemplate,
                                       uint32_t newMsgFlags,
                                       const nsACString &aNewMsgKeywords,
                                       nsIMsgWindow *msgWindow,
                                       nsIMsgCopyServiceListener* listener)
 {
   NS_ENSURE_ARG_POINTER(aFile);
@@ -1938,22 +1938,22 @@ nsMsgLocalMailFolder::CopyFileMessage(ns
 
     nsCOMPtr<nsIInputStream> inputStream;
     rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), aFile);
 
     // All or none for adding a message file to the store
     if (NS_SUCCEEDED(rv) && fileSize > PR_INT32_MAX)
         rv = NS_ERROR_ILLEGAL_VALUE; // may need error code for max msg size
 
-    if (NS_SUCCEEDED(rv) && inputStream) 
+    if (NS_SUCCEEDED(rv) && inputStream)
     {
       char buffer[5];
       uint32_t readCount;
       rv = inputStream->Read(buffer, 5, &readCount);
-      if (NS_SUCCEEDED(rv)) 
+      if (NS_SUCCEEDED(rv))
       {
         if (strncmp(buffer, "From ", 5))
           mCopyState->m_dummyEnvelopeNeeded = true;
         nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(inputStream, &rv);
         if (NS_SUCCEEDED(rv))
           seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, 0);
       }
     }
@@ -2461,17 +2461,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
   if (mCopyState->m_parseMsgState)
   {
     nsCOMPtr<nsIMsgDatabase> msgDb;
     mCopyState->m_parseMsgState->FinishHeader();
     GetDatabaseWOReparse(getter_AddRefs(msgDb));
     if (msgDb)
     {
       nsresult result = mCopyState->m_parseMsgState->GetNewMsgHdr(getter_AddRefs(newHdr));
-      // we need to copy newHdr because mCopyState will get cleared 
+      // we need to copy newHdr because mCopyState will get cleared
       // in OnCopyCompleted, but we need OnCopyCompleted to know about
       // the newHdr, via mCopyState. And we send a notification about newHdr
       // after OnCopyCompleted.
       mCopyState->m_newHdr = newHdr;
       if (NS_SUCCEEDED(result) && newHdr)
       {
         // Copy message metadata.
         if (mCopyState->m_message)
@@ -2480,17 +2480,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
           // Flags may get changed when deleting the original source message in
           // IMAP. We have a copy of the original flags, but parseMsgState has
           // already tried to decide what those flags should be. Who to believe?
           // Let's only deal here with the flags that might get changed, Read
           // and New, and trust upstream code for everything else.
           uint32_t readAndNew = nsMsgMessageFlags::New | nsMsgMessageFlags::Read;
           uint32_t newFlags;
           newHdr->GetFlags(&newFlags);
-          newHdr->SetFlags( (newFlags & ~readAndNew) | 
+          newHdr->SetFlags( (newFlags & ~readAndNew) |
                             ((mCopyState->m_flags) & readAndNew));
 
           // Copy other message properties.
           CopyPropertiesToMsgHdr(newHdr, mCopyState->m_message, mCopyState->m_isMove);
         }
         msgDb->AddNewHdrToDB(newHdr, true);
         if (localUndoTxn)
         {
--- a/mailnews/local/src/nsLocalMailFolder.h
+++ b/mailnews/local/src/nsLocalMailFolder.h
@@ -28,17 +28,17 @@
 #define COPY_BUFFER_SIZE 16384
 
 class nsParseMailMessageState;
 
 struct nsLocalMailCopyState
 {
   nsLocalMailCopyState();
   virtual ~nsLocalMailCopyState();
-  
+
   nsCOMPtr <nsIOutputStream> m_fileStream;
   nsCOMPtr<nsIMsgPluggableStore> m_msgStore;
   nsCOMPtr<nsISupports> m_srcSupport;
   /// Source nsIMsgDBHdr instances.
   nsCOMPtr<nsIArray> m_messages;
   /// Destination nsIMsgDBHdr instances.
   nsCOMPtr<nsIMutableArray> m_destMessages;
   RefPtr<nsLocalMoveCopyMsgTxn> m_undoMsgTxn;
@@ -133,27 +133,27 @@ public:
 
   NS_IMETHOD GetManyHeadersToDownload(bool *retval) override;
 
   NS_IMETHOD GetDeletable (bool *deletable) override;
   NS_IMETHOD GetSizeOnDisk(int64_t *size) override;
 
   NS_IMETHOD GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo, nsIMsgDatabase **db) override;
 
-  NS_IMETHOD DeleteMessages(nsIArray *messages, 
+  NS_IMETHOD DeleteMessages(nsIArray *messages,
                       nsIMsgWindow *msgWindow, bool
                       deleteStorage, bool isMove,
                       nsIMsgCopyServiceListener* listener, bool allowUndo) override;
   NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsIArray* messages,
                           bool isMove, nsIMsgWindow *msgWindow,
                           nsIMsgCopyServiceListener* listener, bool isFolder, bool allowUndo) override;
   NS_IMETHOD CopyFolder(nsIMsgFolder *srcFolder, bool isMoveFolder, nsIMsgWindow *msgWindow,
                           nsIMsgCopyServiceListener* listener) override;
   NS_IMETHOD CopyFileMessage(nsIFile* aFile, nsIMsgDBHdr* msgToReplace,
-                             bool isDraftOrTemplate, 
+                             bool isDraftOrTemplate,
                              uint32_t newMsgFlags,
                              const nsACString &aNewMsgKeywords,
                              nsIMsgWindow *msgWindow,
                              nsIMsgCopyServiceListener* listener) override;
 
   NS_IMETHOD AddMessageDispositionState(nsIMsgDBHdr *aMessage, nsMsgDispositionState aDispositionFlag) override;
   NS_IMETHOD MarkMessagesRead(nsIArray *aMessages, bool aMarkRead) override;
   NS_IMETHOD MarkMessagesFlagged(nsIArray *aMessages, bool aMarkFlagged) override;
@@ -166,17 +166,17 @@ public:
   NS_IMETHOD WriteToFolderCacheElem(nsIMsgFolderCacheElement *element) override;
   NS_IMETHOD ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element) override;
 
   NS_IMETHOD GetName(nsAString& aName) override;
 
   // Used when headers_only is TRUE
   NS_IMETHOD DownloadMessagesForOffline(nsIArray *aMessages, nsIMsgWindow *aWindow) override;
   NS_IMETHOD FetchMsgPreviewText(nsMsgKey *aKeysToFetch, uint32_t aNumKeys,
-                                                 bool aLocalOnly, nsIUrlListener *aUrlListener, 
+                                                 bool aLocalOnly, nsIUrlListener *aUrlListener,
                                                  bool *aAsyncResults) override;
   NS_IMETHOD AddKeywordsToMessages(nsIArray *aMessages, const nsACString& aKeywords) override;
   NS_IMETHOD RemoveKeywordsFromMessages(nsIArray *aMessages, const nsACString& aKeywords) override;
   NS_IMETHOD GetIncomingServerType(nsACString& serverType) override;
 
 protected:
   virtual ~nsMsgLocalMailFolder();
   nsresult CreateChildFromURI(const nsCString &uri, nsIMsgFolder **folder) override;
--- a/mailnews/local/src/nsLocalUndoTxn.cpp
+++ b/mailnews/local/src/nsLocalUndoTxn.cpp
@@ -47,17 +47,17 @@ nsLocalMoveCopyMsgTxn::Init(nsIMsgFolder
 
     nsCString protocolType;
     rv = srcFolder->GetURI(protocolType);
     protocolType.SetLength(protocolType.FindChar(':'));
     if (MsgLowerCaseEqualsLiteral(protocolType, "imap"))
       m_srcIsImap4 = true;
     return nsMsgTxn::Init();
 }
-nsresult 
+nsresult
 nsLocalMoveCopyMsgTxn::GetSrcIsImap(bool *isImap)
 {
   *isImap = m_srcIsImap4;
   return NS_OK;
 }
 nsresult
 nsLocalMoveCopyMsgTxn::SetSrcFolder(nsIMsgFolder* srcFolder)
 {
@@ -101,17 +101,17 @@ nsLocalMoveCopyMsgTxn::AddDstKey(nsMsgKe
 nsresult
 nsLocalMoveCopyMsgTxn::AddDstMsgSize(uint32_t msgSize)
 {
     m_dstSizeArray.AppendElement(msgSize);
     return NS_OK;
 }
 
 nsresult
-nsLocalMoveCopyMsgTxn::UndoImapDeleteFlag(nsIMsgFolder* folder, 
+nsLocalMoveCopyMsgTxn::UndoImapDeleteFlag(nsIMsgFolder* folder,
                                           nsTArray<nsMsgKey>& keyArray,
                                           bool deleteFlag)
 {
   nsresult rv = NS_ERROR_FAILURE;
   if (m_srcIsImap4)
   {
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -151,74 +151,74 @@ nsLocalMoveCopyMsgTxn::UndoImapDeleteFla
   return rv;
 }
 
 NS_IMETHODIMP
 nsLocalMoveCopyMsgTxn::UndoTransaction()
 {
   nsresult rv;
   nsCOMPtr<nsIMsgDatabase> dstDB;
-  
+
   nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIMsgLocalMailFolder> dstlocalMailFolder = do_QueryReferent(m_dstFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   dstlocalMailFolder->GetDatabaseWOReparse(getter_AddRefs(dstDB));
 
   if (!dstDB)
   {
     // This will listen for the db reparse finishing, and the corresponding
     // FolderLoadedNotification. When it gets that, it will then call
     // UndoTransactionInternal.
     mUndoFolderListener = new nsLocalUndoFolderListener(this, dstFolder);
     if (!mUndoFolderListener)
-      return NS_ERROR_OUT_OF_MEMORY; 
+      return NS_ERROR_OUT_OF_MEMORY;
     NS_ADDREF(mUndoFolderListener);
-    
-    nsCOMPtr<nsIMsgMailSession> mailSession = 
-      do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); 
+
+    nsCOMPtr<nsIMsgMailSession> mailSession =
+      do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
-    
+
     rv = mailSession->AddFolderListener(mUndoFolderListener, nsIFolderListener::event);
     NS_ENSURE_SUCCESS(rv,rv);
-    
+
     rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else
     rv = UndoTransactionInternal();
   return rv;
 }
 
-nsresult 
+nsresult
 nsLocalMoveCopyMsgTxn::UndoTransactionInternal()
 {
   nsresult rv = NS_ERROR_FAILURE;
 
   if (mUndoFolderListener)
   {
-    nsCOMPtr<nsIMsgMailSession> mailSession = 
-      do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); 
+    nsCOMPtr<nsIMsgMailSession> mailSession =
+      do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
-    
+
     rv = mailSession->RemoveFolderListener(mUndoFolderListener);
     NS_ENSURE_SUCCESS(rv,rv);
-    
+
     NS_RELEASE(mUndoFolderListener);
     mUndoFolderListener = nullptr;
   }
 
   nsCOMPtr<nsIMsgDatabase> srcDB;
   nsCOMPtr<nsIMsgDatabase> dstDB;
   nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryReferent(m_srcFolder, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
-  
+
   nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
-  
+
   rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
   if(NS_FAILED(rv)) return rv;
 
   rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
   if (NS_FAILED(rv)) return rv;
 
   uint32_t count = m_srcKeyArray.Length();
   uint32_t i;
@@ -243,25 +243,25 @@ nsLocalMoveCopyMsgTxn::UndoTransactionIn
     {
       nsCOMPtr<nsIMutableArray> srcMessages =
         do_CreateInstance(NS_ARRAY_CONTRACTID);
       nsCOMPtr<nsIMutableArray> dstMessages =
         do_CreateInstance(NS_ARRAY_CONTRACTID);
 
       for (i = 0; i < count; i++)
       {
-        rv = dstDB->GetMsgHdrForKey(m_dstKeyArray[i], 
+        rv = dstDB->GetMsgHdrForKey(m_dstKeyArray[i],
                                     getter_AddRefs(oldHdr));
         NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
         if (NS_SUCCEEDED(rv) && oldHdr)
         {
           rv = srcDB->CopyHdrFromExistingHdr(m_srcKeyArray[i],
                                              oldHdr, true,
                                              getter_AddRefs(newHdr));
-          NS_ASSERTION(newHdr, 
+          NS_ASSERTION(newHdr,
                        "fatal ... cannot create new msg header\n");
           if (NS_SUCCEEDED(rv) && newHdr)
           {
             newHdr->SetStatusOffset(m_srcStatusOffsetArray[i]);
             srcDB->UndoDelete(newHdr);
             srcMessages->AppendElement(newHdr, false);
             // (we want to keep these two lists in sync)
             dstMessages->AppendElement(oldHdr, false);
@@ -339,41 +339,41 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
   nsCOMPtr<nsIMsgDatabase> srcDB;
   nsCOMPtr<nsIMsgDatabase> dstDB;
 
   nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryReferent(m_srcFolder, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
-  
+
   rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
   if(NS_FAILED(rv)) return rv;
   rv = dstFolder->GetMsgDatabase(getter_AddRefs(dstDB));
   if (NS_FAILED(rv)) return rv;
 
   uint32_t count = m_srcKeyArray.Length();
   uint32_t i;
   nsCOMPtr<nsIMsgDBHdr> oldHdr;
   nsCOMPtr<nsIMsgDBHdr> newHdr;
 
   nsCOMPtr<nsIMutableArray> srcMessages = do_CreateInstance(NS_ARRAY_CONTRACTID);
   nsCOMPtr <nsISupports> msgSupports;
-  
+
   for (i=0; i<count; i++)
   {
-    rv = srcDB->GetMsgHdrForKey(m_srcKeyArray[i], 
+    rv = srcDB->GetMsgHdrForKey(m_srcKeyArray[i],
                                 getter_AddRefs(oldHdr));
     NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
 
     if (NS_SUCCEEDED(rv) && oldHdr)
     {
       msgSupports =do_QueryInterface(oldHdr);
       srcMessages->AppendElement(msgSupports, false);
-      
+
       if (m_canUndelete)
       {
       rv = dstDB->CopyHdrFromExistingHdr(m_dstKeyArray[i],
                                          oldHdr, true,
                                          getter_AddRefs(newHdr));
       NS_ASSERTION(newHdr, "fatal ... cannot get new msg header\n");
       if (NS_SUCCEEDED(rv) && newHdr)
       {
@@ -390,17 +390,17 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
   {
     if (m_srcIsImap4)
     {
       // protect against a bogus undo txn without any source keys
       // see bug #179856 for details
       NS_ASSERTION(!m_srcKeyArray.IsEmpty(), "no source keys");
       if (m_srcKeyArray.IsEmpty())
         return NS_ERROR_UNEXPECTED;
-    
+
       bool deleteFlag = false; //message is un-deleted- we are trying to redo
       CheckForToggleDelete(srcFolder, m_srcKeyArray[0], &deleteFlag); // there could have been a toggle
       rv = UndoImapDeleteFlag(srcFolder, m_srcKeyArray, deleteFlag);
     }
     else if (m_canUndelete)
     {
       nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(srcFolder);
       if (localFolder)
--- a/mailnews/local/src/nsLocalUtils.cpp
+++ b/mailnews/local/src/nsLocalUtils.cpp
@@ -28,36 +28,36 @@
 static nsresult
 nsGetMailboxServer(const char *uriStr, nsIMsgIncomingServer** aResult)
 {
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIURL> aUrl = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
 
-  rv = aUrl->SetSpec(nsDependentCString(uriStr));  
+  rv = aUrl->SetSpec(nsDependentCString(uriStr));
   if (NS_FAILED(rv)) return rv;
 
   // retrieve the AccountManager
-  nsCOMPtr<nsIMsgAccountManager> accountManager = 
+  nsCOMPtr<nsIMsgAccountManager> accountManager =
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
-  
+
   // find all local mail "no servers" matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> none_server;
   aUrl->SetScheme(NS_LITERAL_CSTRING("none"));
   // No unescaping of username or hostname done here.
   // The unescaping is done inside of FindServerByURI
   rv = accountManager->FindServerByURI(aUrl, false,
                                   getter_AddRefs(none_server));
   if (NS_SUCCEEDED(rv)) {
     none_server.forget(aResult);
     return rv;
   }
-  
+
   // if that fails, look for the rss hosts matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> rss_server;
   aUrl->SetScheme(NS_LITERAL_CSTRING("rss"));
   rv = accountManager->FindServerByURI(aUrl, false,
                                   getter_AddRefs(rss_server));
   if (NS_SUCCEEDED(rv))
   {
      rss_server.forget(aResult);
@@ -72,32 +72,32 @@ nsGetMailboxServer(const char *uriStr, n
   if (NS_SUCCEEDED(rv)) {
     movemail_server.forget(aResult);
     return rv;
   }
 #endif /* HAVE_MOVEMAIL */
 
   // if that fails, look for the pop hosts matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> server;
-  if (NS_FAILED(rv)) 
+  if (NS_FAILED(rv))
   {
     aUrl->SetScheme(NS_LITERAL_CSTRING("pop3"));
     rv = accountManager->FindServerByURI(aUrl, false,
                                     getter_AddRefs(server));
 
-    // if we can't find a pop server, maybe it's a local message 
+    // if we can't find a pop server, maybe it's a local message
     // in an imap hierarchy. look for an imap server.
-    if (NS_FAILED(rv)) 
+    if (NS_FAILED(rv))
     {
       aUrl->SetScheme(NS_LITERAL_CSTRING("imap"));
       rv = accountManager->FindServerByURI(aUrl, false,
                                     getter_AddRefs(server));
     }
   }
-  if (NS_SUCCEEDED(rv)) 
+  if (NS_SUCCEEDED(rv))
   {
     server.forget(aResult);
     return rv;
   }
 
 // if you fail after looking at all "pop3", "movemail" and "none" servers, you fail.
 return rv;
 }
@@ -116,17 +116,17 @@ nsLocalURI2Server(const char* uriStr,
 // given rootURI and rootURI##folder, return on-disk path of folder
 nsresult
 nsLocalURI2Path(const char* rootURI, const char* uriStr,
                 nsCString& pathResult)
 {
   nsresult rv;
 
   // verify that rootURI starts with "mailbox:/" or "mailbox-message:/"
-  if ((PL_strcmp(rootURI, kMailboxRootURI) != 0) && 
+  if ((PL_strcmp(rootURI, kMailboxRootURI) != 0) &&
       (PL_strcmp(rootURI, kMailboxMessageRootURI) != 0)) {
     return NS_ERROR_FAILURE;
   }
 
   // verify that uristr starts with rooturi
   nsAutoCString uri(uriStr);
   if (uri.Find(rootURI) != 0)
     return NS_ERROR_FAILURE;
@@ -219,17 +219,17 @@ nsresult nsBuildLocalMessageURI(const ch
 
 nsresult nsCreateLocalBaseMessageURI(const nsACString& baseURI, nsCString &baseMessageURI)
 {
   nsAutoCString tailURI(baseURI);
 
   // chop off mailbox:/
   if (tailURI.Find(kMailboxRootURI) == 0)
     tailURI.Cut(0, PL_strlen(kMailboxRootURI));
-  
+
   baseMessageURI = kMailboxMessageRootURI;
   baseMessageURI += tailURI;
 
   return NS_OK;
 }
 
 void nsEscapeNativePath(nsCString& nativePath)
 {
--- a/mailnews/local/src/nsLocalUtils.h
+++ b/mailnews/local/src/nsLocalUtils.h
@@ -13,17 +13,17 @@ static const char kMailboxRootURI[] = "m
 static const char kMailboxMessageRootURI[] = "mailbox-message:/";
 
 nsresult
 nsLocalURI2Path(const char* rootURI, const char* uriStr, nsCString& pathResult);
 
 nsresult
 nsParseLocalMessageURI(const char* uri, nsCString& folderURI, nsMsgKey *key);
 
-nsresult 
+nsresult
 nsBuildLocalMessageURI(const char* baseURI, nsMsgKey key, nsCString& uri);
 
 nsresult
 nsCreateLocalBaseMessageURI(const nsACString& baseURI, nsCString &baseMessageURI);
 
 void
 nsEscapeNativePath(nsCString& nativePath);
 
--- a/mailnews/local/src/nsMailboxUrl.cpp
+++ b/mailnews/local/src/nsMailboxUrl.cpp
@@ -485,17 +485,17 @@ nsresult nsMailboxUrl::GetFolder(nsIMsgF
   return msg->GetFolder(msgFolder);
 }
 
 NS_IMETHODIMP nsMailboxUrl::GetFolderCharset(char ** aCharacterSet)
 {
   NS_ENSURE_ARG_POINTER(aCharacterSet);
   nsCOMPtr<nsIMsgFolder> folder;
   nsresult rv = GetFolder(getter_AddRefs(folder));
-  
+
   // In cases where a file is not associated with a folder, for
   // example standalone .eml files, failure is normal.
   if (NS_FAILED(rv))
     return rv;
   nsCString tmpStr;
   folder->GetCharset(tmpStr);
   *aCharacterSet = ToNewCString(tmpStr);
   return NS_OK;
--- a/mailnews/local/src/nsMovemailIncomingServer.cpp
+++ b/mailnews/local/src/nsMovemailIncomingServer.cpp
@@ -16,28 +16,27 @@
 static NS_DEFINE_CID(kCMovemailServiceCID, NS_MOVEMAILSERVICE_CID);
 
 
 NS_IMPL_ISUPPORTS_INHERITED(nsMovemailIncomingServer,
                              nsMsgIncomingServer,
                              nsIMovemailIncomingServer,
                              nsILocalMailIncomingServer)
 
-                            
 
 nsMovemailIncomingServer::nsMovemailIncomingServer()
-{    
+{
     m_canHaveFilters = true;
 }
 
 nsMovemailIncomingServer::~nsMovemailIncomingServer()
 {
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMovemailIncomingServer::PerformBiff(nsIMsgWindow *aMsgWindow)
 {
     nsresult rv;
     nsCOMPtr<nsIMovemailService> movemailService(do_GetService(
                                                  kCMovemailServiceCID, &rv));
     if (NS_FAILED(rv)) return rv;
     nsCOMPtr<nsIMsgFolder> inbox;
     nsCOMPtr<nsIMsgFolder> rootMsgFolder;
@@ -85,17 +84,17 @@ nsMovemailIncomingServer::PerformBiff(ns
               {
                  rv = localInbox->SetCheckForNewMessagesAfterParsing(true);
               }
            }
        }
     }
     else
     {
-        movemailService->CheckForNewMail(urlListener, inbox, this, nullptr); 
+        movemailService->CheckForNewMail(urlListener, inbox, this, nullptr);
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::SetFlagsOnDefaultMailboxes()
 {
@@ -121,27 +120,27 @@ NS_IMETHODIMP nsMovemailIncomingServer::
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetNewMail(nsIMsgWindow *aMsgWindow,
                                      nsIUrlListener *aUrlListener,
                                      nsIMsgFolder *aMsgFolder,
                                      nsIURI **aResult)
 {
     nsresult rv;
-    
-    nsCOMPtr<nsIMovemailService> movemailService = 
+
+    nsCOMPtr<nsIMovemailService> movemailService =
              do_GetService(kCMovemailServiceCID, &rv);
-    
+
     if (NS_FAILED(rv)) return rv;
-    
+
     rv = movemailService->GetNewMail(aMsgWindow, aUrlListener,
                                      aMsgFolder, this, aResult);
 
     return rv;
-}        
+}
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetDownloadMessagesAtStartup(bool *getMessagesAtStartup)
 {
     NS_ENSURE_ARG_POINTER(getMessagesAtStartup);
     *getMessagesAtStartup = true;
     return NS_OK;
 }
@@ -157,22 +156,22 @@ nsMovemailIncomingServer::GetCanBeDefaul
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
     NS_ENSURE_ARG_POINTER(canSearchMessages);
     *canSearchMessages = true;
     return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMovemailIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
     NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
     *aServerRequiresPasswordForBiff = false;
     return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMovemailIncomingServer::GetAccountManagerChrome(nsAString& aResult)
 {
     aResult.AssignLiteral("am-main.xul");
     return NS_OK;
 }
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -211,17 +211,17 @@ SpoolLock::ObtainSpoolLock(unsigned int 
     PRFileDesc *fd;
     rv = spoolFile->OpenNSPRFileDesc(PR_RDWR, 0, &fd);
     NS_ENSURE_SUCCESS(rv, false);
     PRStatus lock_result;
     unsigned int retry_count = 0;
 
     do {
       lock_result = PR_TLockFile(fd);
-  
+
       retry_count++;
       LOG(("Attempt %d of %d to lock file", retry_count, aSeconds));
       if (aSeconds > 0 && lock_result == PR_FAILURE) {
         // pause 1sec, waiting for .lock to go away
         PRIntervalTime sleepTime = 1000; // 1 second
         PR_Sleep(sleepTime);
       }
     } while (lock_result == PR_FAILURE && retry_count < aSeconds);
--- a/mailnews/local/src/nsMsgLocalStoreUtils.cpp
+++ b/mailnews/local/src/nsMsgLocalStoreUtils.cpp
@@ -1,13 +1,13 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- 
+
 #include "msgCore.h"    // precompiled header...
 #include "nsMsgLocalStoreUtils.h"
 #include "nsIFile.h"
 #include "nsIDBFolderInfo.h"
 #include "nsIMsgDatabase.h"
 #include "prprf.h"
 
 #define EXTRA_SAFETY_SPACE 0x400000 // (4MiB)
--- a/mailnews/local/src/nsNoneService.cpp
+++ b/mailnews/local/src/nsNoneService.cpp
@@ -31,40 +31,40 @@ nsNoneService::~nsNoneService()
 
 NS_IMPL_ISUPPORTS(nsNoneService, nsINoneService, nsIMsgProtocolInfo)
 
 NS_IMETHODIMP
 nsNoneService::SetDefaultLocalPath(nsIFile *aPath)
 {
     NS_ENSURE_ARG(aPath);
     return NS_SetPersistentFile(PREF_MAIL_ROOT_NONE_REL, PREF_MAIL_ROOT_NONE, aPath);
-}     
+}
 
 NS_IMETHODIMP
 nsNoneService::GetDefaultLocalPath(nsIFile ** aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
     *aResult = nullptr;
-    
+
     bool havePref;
-    nsCOMPtr<nsIFile> localFile;    
+    nsCOMPtr<nsIFile> localFile;
     nsresult rv = NS_GetPersistentFile(PREF_MAIL_ROOT_NONE_REL,
                               PREF_MAIL_ROOT_NONE,
                               NS_APP_MAIL_50_DIR,
                               havePref,
                               getter_AddRefs(localFile));
     if (NS_FAILED(rv)) return rv;
-    
+
     bool exists;
     rv = localFile->Exists(&exists);
     if (NS_SUCCEEDED(rv) && !exists)
         rv = localFile->Create(nsIFile::DIRECTORY_TYPE, 0775);
     if (NS_FAILED(rv)) return rv;
-    
-    if (!havePref || !exists) 
+
+    if (!havePref || !exists)
     {
         rv = NS_SetPersistentFile(PREF_MAIL_ROOT_NONE_REL, PREF_MAIL_ROOT_NONE, localFile);
         NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to set root dir pref.");
     }
 
     localFile.forget(aResult);
     return NS_OK;
 }
@@ -101,64 +101,64 @@ nsNoneService::GetCanLoginAtStartUp(bool
 }
 
 NS_IMETHODIMP
 nsNoneService::GetCanDelete(bool *aCanDelete)
 {
   NS_ENSURE_ARG_POINTER(aCanDelete);
   *aCanDelete = false;
   return NS_OK;
-}  
+}
 
 NS_IMETHODIMP
 nsNoneService::GetCanDuplicate(bool *aCanDuplicate)
 {
   NS_ENSURE_ARG_POINTER(aCanDuplicate);
   *aCanDuplicate = false;
   return NS_OK;
-}  
+}
 
 NS_IMETHODIMP
 nsNoneService::GetCanGetMessages(bool *aCanGetMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetMessages);
     *aCanGetMessages = false;
     return NS_OK;
-}  
+}
 
 NS_IMETHODIMP
 nsNoneService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
     *aCanGetIncomingMessages = false;
     return NS_OK;
-} 
+}
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsNoneService::GetDefaultDoBiff(bool *aDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDoBiff);
     // by default, don't do biff for "none" servers
-    *aDoBiff = false;    
+    *aDoBiff = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetDefaultServerPort(bool isSecure, int32_t *aDefaultPort)
 {
     NS_ENSURE_ARG_POINTER(aDefaultPort);
     *aDefaultPort = -1;
     return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsNoneService::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-    *showComposeMsgLink = false;    
+    *showComposeMsgLink = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetFoldersCreatedAsync(bool *aAsyncCreation)
 {
   NS_ENSURE_ARG_POINTER(aAsyncCreation);
   *aAsyncCreation = false;
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -868,17 +868,17 @@ NS_IMETHODIMP nsPop3Protocol::OnPromptSt
           MOZ_LOG(POP3LOGMODULE, LogLevel::Warning, (POP3LOG("retry button pressed")));
           // try all methods again, including GSSAPI
           ResetAuthMethods();
           ClearFlag(POP3_PASSWORD_FAILED|POP3_AUTH_FAILURE);
 
           if (m_needToRerunUrl)
             return RerunUrl();
 
-          // It is a bit strange that we're going onto the next state that 
+          // It is a bit strange that we're going onto the next state that
           // would essentially send the password. However in resetting the
           // auth methods above, we're setting up SendUsername, SendPassword
           // and friends to abort and return to the POP3_SEND_CAPA state.
           // Hence we can do this safely.
           m_pop3ConData->next_state = GetNextPasswordObtainState();
           // As we're async, calling ProcessProtocolState gets things going
           // again.
           ProcessProtocolState(nullptr, nullptr, 0, 0);
@@ -2404,17 +2404,17 @@ nsPop3Protocol::GetStat()
     m_nsIPop3Sink->BeginMailDelivery(false, nullptr, nullptr);
     m_nsIPop3Sink->AbortMailDelivery(this);
     return(0);
   }
 
   /* We're just checking for new mail, and we're not playing any games that
      involve keeping messages on the server.  Therefore, we now know enough
      to finish up.  If we had no messages, that would have been handled
-     above; therefore, we know we have some new messages. 
+     above; therefore, we know we have some new messages.
   */
   if (m_pop3ConData->only_check_for_new_mail && !m_pop3ConData->leave_on_server)
   {
     m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail,
                                            m_pop3ConData->number_of_messages,
                                            true);
     m_pop3ConData->next_state = POP3_SEND_QUIT;
     return(0);
@@ -2622,17 +2622,17 @@ int32_t nsPop3Protocol::HandleNoUidListA
   }
   m_pop3ConData->next_state = POP3_SEND_QUIT;
   nsCString hostName;
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
   nsresult rv = server->GetRealHostName(hostName);
   NS_ENSURE_SUCCESS(rv, -1);
   NS_ConvertASCIItoUTF16 hostNameUnicode(hostName);
   const char16_t *params[] = { hostNameUnicode.get() };
-  return Error("pop3ServerDoesNotSupportUidlEtc", params, 1);  
+  return Error("pop3ServerDoesNotSupportUidlEtc", params, 1);
 }
 
 
 /* km
  *
  *  net_pop3_send_xtnd_xlst_msgid
  *
  *  Process state: POP3_SEND_XTND_XLST_MSGID
--- a/mailnews/local/src/nsPop3Service.h
+++ b/mailnews/local/src/nsPop3Service.h
@@ -20,28 +20,28 @@ class nsIMsgMailNewsUrl;
 
 class nsPop3Service : public nsIPop3Service,
                       public nsIProtocolHandler,
                       public nsIMsgProtocolInfo
 {
 public:
 
   nsPop3Service();
-  
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPOP3SERVICE
   NS_DECL_NSIPROTOCOLHANDLER
   NS_DECL_NSIMSGPROTOCOLINFO
 
 protected:
   virtual ~nsPop3Service();
   nsresult GetMail(bool downloadNewMail,
-                   nsIMsgWindow* aMsgWindow, 
+                   nsIMsgWindow* aMsgWindow,
                    nsIUrlListener * aUrlListener,
-                   nsIMsgFolder *inbox, 
+                   nsIMsgFolder *inbox,
                    nsIPop3IncomingServer *popServer,
                    nsIURI ** aURL);
   // convience function to make constructing of the pop3 url easier...
   nsresult BuildPop3Url(const char * urlSpec, nsIMsgFolder *inbox,
                     nsIPop3IncomingServer *, nsIUrlListener * aUrlListener,
                     nsIURI ** aUrl, nsIMsgWindow *aMsgWindow);
 
   nsresult RunPopUrl(nsIMsgIncomingServer * aServer, nsIURI * aUrlToRun);
--- a/mailnews/local/src/nsRssService.cpp
+++ b/mailnews/local/src/nsRssService.cpp
@@ -16,22 +16,22 @@ nsRssService::nsRssService()
 
 nsRssService::~nsRssService()
 {
 }
 
 NS_IMPL_ISUPPORTS(nsRssService,
                    nsIRssService,
                    nsIMsgProtocolInfo)
-                   
+
 NS_IMETHODIMP nsRssService::GetDefaultLocalPath(nsIFile * *aDefaultLocalPath)
 {
     NS_ENSURE_ARG_POINTER(aDefaultLocalPath);
     *aDefaultLocalPath = nullptr;
-    
+
     nsCOMPtr<nsIFile> localFile;
     nsCOMPtr<nsIProperties> dirService(do_GetService("@mozilla.org/file/directory_service;1"));
     if (!dirService) return NS_ERROR_FAILURE;
     dirService->Get(NS_APP_MAIL_50_DIR, NS_GET_IID(nsIFile), getter_AddRefs(localFile));
     if (!localFile) return NS_ERROR_FAILURE;
 
     bool exists;
     nsresult rv = localFile->Exists(&exists);
@@ -105,24 +105,24 @@ NS_IMETHODIMP nsRssService::GetCanGetInc
     *aCanGetIncomingMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetDefaultDoBiff(bool *aDefaultDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDefaultDoBiff);
     // by default, do biff for RSS feeds
-    *aDefaultDoBiff = true;    
+    *aDefaultDoBiff = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetShowComposeMsgLink(bool *aShowComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(aShowComposeMsgLink);
-    *aShowComposeMsgLink = false;    
+    *aShowComposeMsgLink = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetFoldersCreatedAsync(bool *aAsyncCreation)
 {
   NS_ENSURE_ARG_POINTER(aAsyncCreation);
   *aAsyncCreation = false;
   return NS_OK;
--- a/mailnews/local/src/nsRssService.h
+++ b/mailnews/local/src/nsRssService.h
@@ -8,17 +8,17 @@
 #include "nsIRssService.h"
 #include "nsIMsgProtocolInfo.h"
 
 class nsRssService : public nsIMsgProtocolInfo, public nsIRssService
 {
 public:
 
   nsRssService();
-  
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSIRSSSERVICE
   NS_DECL_NSIMSGPROTOCOLINFO
 
 private:
   virtual ~nsRssService();
 };