summaryrefslogtreecommitdiff
path: root/mailnews
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 20:14:13 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 20:14:13 -0500
commita2a658f885ea5cca042709f5a53224dbe57fb478 (patch)
tree014221ae0a8cc6e9b81d4f8ecc48da984e6aedc6 /mailnews
parent713dca2fd8c13e9d417adc7f56ea3b2b54e6d54e (diff)
downloaduxp-a2a658f885ea5cca042709f5a53224dbe57fb478.tar.gz
Bug 1416033 - remove some unneeded includes in mailnews
Tag #1273
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/addrbook/public/nsIAbLDAPCard.idl4
-rw-r--r--mailnews/addrbook/src/nsAbBSDirectory.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbCardProperty.cpp2
-rw-r--r--mailnews/addrbook/src/nsAbDirProperty.h2
-rw-r--r--mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectory.cpp3
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryModify.h1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPReplicationQuery.h1
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirFactory.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirProperty.cpp4
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirectory.cpp2
-rw-r--r--mailnews/addrbook/src/nsAbManager.cpp4
-rw-r--r--mailnews/addrbook/src/nsAbManager.h1
-rw-r--r--mailnews/addrbook/src/nsAbOSXDirectory.h2
-rw-r--r--mailnews/addrbook/src/nsAbView.cpp3
-rw-r--r--mailnews/addrbook/src/nsAddbookProtocolHandler.cpp3
-rw-r--r--mailnews/addrbook/src/nsAddbookProtocolHandler.h2
-rw-r--r--mailnews/addrbook/src/nsAddrDatabase.cpp1
-rw-r--r--mailnews/addrbook/src/nsAddrDatabase.h1
-rw-r--r--mailnews/addrbook/src/nsWabAddressBook.cpp1
-rw-r--r--mailnews/base/src/nsMsgAccountManager.cpp1
-rw-r--r--mailnews/base/src/nsMsgBiffManager.cpp1
-rw-r--r--mailnews/base/src/nsMsgDBView.cpp2
-rw-r--r--mailnews/base/src/nsMsgFolderCompactor.cpp1
-rw-r--r--mailnews/base/util/nsMsgCompressIStream.cpp1
-rw-r--r--mailnews/base/util/nsMsgDBFolder.cpp1
-rw-r--r--mailnews/base/util/nsMsgLineBuffer.cpp2
-rw-r--r--mailnews/base/util/nsMsgMailNewsUrl.cpp1
-rw-r--r--mailnews/base/util/nsMsgProtocol.cpp2
-rw-r--r--mailnews/db/msgdb/src/nsMailDatabase.cpp1
-rw-r--r--mailnews/db/msgdb/src/nsMsgDatabase.cpp3
-rw-r--r--mailnews/db/msgdb/src/nsMsgHdr.cpp1
-rw-r--r--mailnews/extensions/smime/src/nsMsgComposeSecure.cpp3
-rw-r--r--mailnews/imap/src/nsIMAPNamespace.cpp1
-rw-r--r--mailnews/imap/src/nsImapMailFolder.cpp2
-rw-r--r--mailnews/imap/src/nsImapOfflineSync.cpp2
-rw-r--r--mailnews/imap/src/nsImapProtocol.cpp2
-rw-r--r--mailnews/imap/src/nsImapUrl.cpp2
-rw-r--r--mailnews/import/outlook/src/MapiMessage.cpp1
-rw-r--r--mailnews/import/outlook/src/nsOutlookCompose.cpp1
-rw-r--r--mailnews/import/text/src/nsTextAddress.cpp1
-rw-r--r--mailnews/intl/nsCharsetConverterManager.h1
-rw-r--r--mailnews/mime/emitters/nsMimeBaseEmitter.cpp1
-rw-r--r--mailnews/news/src/nsNNTPProtocol.cpp1
47 files changed, 9 insertions, 69 deletions
diff --git a/mailnews/addrbook/public/nsIAbLDAPCard.idl b/mailnews/addrbook/public/nsIAbLDAPCard.idl
index 6761623f23..c1e444291b 100644
--- a/mailnews/addrbook/public/nsIAbLDAPCard.idl
+++ b/mailnews/addrbook/public/nsIAbLDAPCard.idl
@@ -2,8 +2,8 @@
/* 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 "nsIAbCard.idl"
+
+#include "nsISupports.idl"
interface nsIAbLDAPAttributeMap;
interface nsILDAPModification;
diff --git a/mailnews/addrbook/src/nsAbBSDirectory.cpp b/mailnews/addrbook/src/nsAbBSDirectory.cpp
index 7ebe678456..446963bb2c 100644
--- a/mailnews/addrbook/src/nsAbBSDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbBSDirectory.cpp
@@ -3,7 +3,6 @@
* 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 "nsIPrefService.h"
#include "nsAbBSDirectory.h"
#include "nsDirPrefs.h"
diff --git a/mailnews/addrbook/src/nsAbCardProperty.cpp b/mailnews/addrbook/src/nsAbCardProperty.cpp
index 2c40a40343..aa4b51db18 100644
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -6,7 +6,7 @@
#include "nsAbCardProperty.h"
#include "nsAbBaseCID.h"
#include "nsIPrefService.h"
-#include "nsIAddrDatabase.h"
+#include "nsIAbDirectory.h"
#include "plbase64.h"
#include "nsIStringBundle.h"
#include "plstr.h"
diff --git a/mailnews/addrbook/src/nsAbDirProperty.h b/mailnews/addrbook/src/nsAbDirProperty.h
index 99d16a1335..5e15a15fcf 100644
--- a/mailnews/addrbook/src/nsAbDirProperty.h
+++ b/mailnews/addrbook/src/nsAbDirProperty.h
@@ -13,10 +13,8 @@
#define nsAbDirProperty_h__
#include "nsIAbDirectory.h" /* include the interface we are going to support */
-#include "nsIAbCard.h"
#include "nsCOMPtr.h"
#include "nsDirPrefs.h"
-#include "nsIAddrDatabase.h"
#include "nsStringGlue.h"
#include "nsIPrefBranch.h"
#include "nsIMutableArray.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
index cc4c042506..acec2e5391 100644
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
@@ -7,7 +7,6 @@
#include "nsAbLDAPChangeLogData.h"
#include "nsAbLDAPChangeLogQuery.h"
#include "nsILDAPMessage.h"
-#include "nsIAbCard.h"
#include "nsIAddrBookSession.h"
#include "nsAbBaseCID.h"
#include "nsAbUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
index d1bb484c08..480de0564d 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
@@ -8,7 +8,6 @@
#include "nsAbQueryStringToExpression.h"
#include "nsAbBaseCID.h"
-#include "nsIAbManager.h"
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsNetCID.h"
@@ -18,6 +17,8 @@
#include "nsEnumeratorUtils.h"
#include "nsIAbLDAPAttributeMap.h"
#include "nsIAbMDBDirectory.h"
+#include "nsIAbManager.h"
+#include "nsIAddrDatabase.h"
#include "nsILDAPURL.h"
#include "nsILDAPConnection.h"
#include "nsAppDirectoryServiceDefs.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
index 95af79c04a..8322f6974e 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
@@ -8,7 +8,6 @@
#include "nsILDAPConnection.h"
#include "nsILDAPErrors.h"
#include "nsILDAPModification.h"
-#include "nsIServiceManager.h"
#include "nsIAbLDAPDirectory.h"
#include "nsIMutableArray.h"
#include "nsComponentManagerUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
index 8e14b83684..c1a2f591f2 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
@@ -8,7 +8,6 @@
#include "nsAbLDAPListenerBase.h"
#include "nsIAbLDAPDirectory.h"
-#include "nsILDAPOperation.h"
#include "nsIArray.h"
class nsILDAPURL;
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
index 9b22c796cb..18964a380a 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
@@ -7,7 +7,6 @@
#include "nsAbBoolExprToLDAPFilter.h"
#include "nsILDAPMessage.h"
#include "nsILDAPErrors.h"
-#include "nsILDAPOperation.h"
#include "nsIAbLDAPAttributeMap.h"
#include "nsIAbLDAPCard.h"
#include "nsAbUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
index d82a8336c9..cab9825eda 100644
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
@@ -8,7 +8,6 @@
#include "nsAbLDAPReplicationQuery.h"
#include "nsAbLDAPReplicationService.h"
#include "nsAbLDAPReplicationData.h"
-#include "nsILDAPURL.h"
#include "nsAbBaseCID.h"
#include "nsAbUtils.h"
#include "nsDirPrefs.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
index f5d7cdda78..ebae95cbd8 100644
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
@@ -6,7 +6,6 @@
#ifndef nsAbLDAPReplicationQuery_h__
#define nsAbLDAPReplicationQuery_h__
-#include "nsIWebProgressListener.h"
#include "nsIAbLDAPReplicationQuery.h"
#include "nsIAbLDAPReplicationData.h"
#include "nsIAbLDAPDirectory.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirFactory.cpp b/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
index 73ecb32fc2..546a80d17a 100644
--- a/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
@@ -11,7 +11,6 @@
#include "nsIAbManager.h"
#include "nsIAbMDBDirectory.h"
#include "nsAbMDBDirFactory.h"
-#include "nsIAddrDBListener.h"
#include "nsIAddrDatabase.h"
#include "nsEnumeratorUtils.h"
#include "nsIMutableArray.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
index 7df904d870..1a7ae59d7d 100644
--- a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
@@ -3,14 +3,12 @@
* 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 "nsAbMDBDirProperty.h"
-#include "nsIServiceManager.h"
+#include "nsAbMDBDirProperty.h"
#include "nsStringGlue.h"
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
#include "nsIAbCard.h"
-#include "nsIAbListener.h"
#include "nsArrayUtils.h"
#include "mdb.h"
#include "nsComponentManagerUtils.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirectory.cpp b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
index be4799cf15..cb212158e0 100644
--- a/mailnews/addrbook/src/nsAbMDBDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
@@ -8,9 +8,7 @@
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
-#include "nsIAbListener.h"
#include "nsIAbManager.h"
-#include "nsIURL.h"
#include "nsNetCID.h"
#include "nsAbDirectoryQuery.h"
#include "nsIAbDirectoryQueryProxy.h"
diff --git a/mailnews/addrbook/src/nsAbManager.cpp b/mailnews/addrbook/src/nsAbManager.cpp
index 2de1b44681..ca640248e2 100644
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -6,7 +6,6 @@
#include "nsAbManager.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
-#include "nsIAbMDBDirectory.h"
#include "nsIOutputStream.h"
#include "nsNetUtil.h"
#include "nsMsgI18N.h"
@@ -15,7 +14,6 @@
#include "nsAppDirectoryServiceDefs.h"
#include "plstr.h"
#include "prmem.h"
-#include "nsIServiceManager.h"
#include "mozIDOMWindow.h"
#include "nsIFilePicker.h"
#include "plbase64.h"
@@ -32,9 +30,7 @@
#include "nsIObserverService.h"
#include "nsDirPrefs.h"
#include "nsThreadUtils.h"
-#include "nsIAbDirFactory.h"
#include "nsComponentManagerUtils.h"
-#include "nsIIOService.h"
#include "nsAbQueryStringToExpression.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Services.h"
diff --git a/mailnews/addrbook/src/nsAbManager.h b/mailnews/addrbook/src/nsAbManager.h
index 066fa8a08d..0922db38d5 100644
--- a/mailnews/addrbook/src/nsAbManager.h
+++ b/mailnews/addrbook/src/nsAbManager.h
@@ -12,7 +12,6 @@
#include "nsICommandLineHandler.h"
#include "nsIObserver.h"
#include "nsInterfaceHashtable.h"
-#include "nsIAbDirFactoryService.h"
#include "nsIAbDirectory.h"
class nsIAbLDAPAttributeMap;
diff --git a/mailnews/addrbook/src/nsAbOSXDirectory.h b/mailnews/addrbook/src/nsAbOSXDirectory.h
index 7e3fad96c5..1be0544805 100644
--- a/mailnews/addrbook/src/nsAbOSXDirectory.h
+++ b/mailnews/addrbook/src/nsAbOSXDirectory.h
@@ -10,8 +10,6 @@
#include "nsISupports.h"
#include "nsAbBaseCID.h"
#include "nsAbDirProperty.h"
-#include "nsIAbDirectoryQuery.h"
-#include "nsIAbDirectorySearch.h"
#include "nsIAbDirSearchListener.h"
#include "nsIMutableArray.h"
#include "nsInterfaceHashtable.h"
diff --git a/mailnews/addrbook/src/nsAbView.cpp b/mailnews/addrbook/src/nsAbView.cpp
index aed4390de8..0cd52396de 100644
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -8,7 +8,6 @@
#include "nsAbView.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
#include "nsIAbCard.h"
#include "nsILocale.h"
#include "nsILocaleService.h"
@@ -26,7 +25,7 @@
#include "nsIStringBundle.h"
#include "nsIPrefLocalizedString.h"
#include "nsArrayUtils.h"
-#include "nsIAddrDatabase.h" // for kPriEmailColumn
+#include "nsIAddrDatabase.h" // for kPhoneticNameColumn
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
diff --git a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
index 9507a3cc92..8681ae4a60 100644
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -4,9 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "msgCore.h" // precompiled header...
#include "nsStringGlue.h"
-#include "nsIIOService.h"
-#include "nsIStreamListener.h"
#include "nsAddbookProtocolHandler.h"
#include "nsAddbookUrl.h"
@@ -21,7 +19,6 @@
#include "nsIAbView.h"
#include "nsITreeView.h"
#include "nsIStringBundle.h"
-#include "nsIServiceManager.h"
#include "mozilla/Services.h"
#include "nsIAsyncInputStream.h"
#include "nsIAsyncOutputStream.h"
diff --git a/mailnews/addrbook/src/nsAddbookProtocolHandler.h b/mailnews/addrbook/src/nsAddbookProtocolHandler.h
index 1eb07a4ffb..f14d54c4ea 100644
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.h
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.h
@@ -11,7 +11,7 @@
#include "nsAddbookProtocolHandler.h"
#include "nsIProtocolHandler.h"
#include "nsIAddbookUrl.h"
-#include "nsIAddrDatabase.h"
+#include "nsIAbDirectory.h"
class nsAddbookProtocolHandler : public nsIProtocolHandler
{
diff --git a/mailnews/addrbook/src/nsAddrDatabase.cpp b/mailnews/addrbook/src/nsAddrDatabase.cpp
index 9b1450b94b..463437958f 100644
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -31,7 +31,6 @@
#include "nsIPrefBranch.h"
#include "nsIAbManager.h"
#include "mozilla/Services.h"
-#include <algorithm>
#define ID_PAB_TABLE 1
#define ID_DELETEDCARDS_TABLE 2
diff --git a/mailnews/addrbook/src/nsAddrDatabase.h b/mailnews/addrbook/src/nsAddrDatabase.h
index 3b4e4eee68..6a12f17441 100644
--- a/mailnews/addrbook/src/nsAddrDatabase.h
+++ b/mailnews/addrbook/src/nsAddrDatabase.h
@@ -14,7 +14,6 @@
#include "nsCOMPtr.h"
#include "nsTObserverArray.h"
#include "nsWeakPtr.h"
-#include "nsIWeakReferenceUtils.h"
typedef enum
{
diff --git a/mailnews/addrbook/src/nsWabAddressBook.cpp b/mailnews/addrbook/src/nsWabAddressBook.cpp
index 9c991ddf5c..44ccdea2c5 100644
--- a/mailnews/addrbook/src/nsWabAddressBook.cpp
+++ b/mailnews/addrbook/src/nsWabAddressBook.cpp
@@ -6,7 +6,6 @@
#include <tchar.h>
#include "nsWabAddressBook.h"
#include "mozilla/Logging.h"
-#include <algorithm>
#ifdef PR_LOGGING
static PRLogModuleInfo* gWabAddressBookLog
diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp
index 5dd3893b67..9dd73d6f97 100644
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -71,7 +71,6 @@
#include "nsIMsgFilterList.h"
#include "nsDirectoryServiceUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsIFileStreams.h"
#include "nsIOutputStream.h"
#include "nsISafeOutputStream.h"
diff --git a/mailnews/base/src/nsMsgBiffManager.cpp b/mailnews/base/src/nsMsgBiffManager.cpp
index 360600147f..d0fc8aba47 100644
--- a/mailnews/base/src/nsMsgBiffManager.cpp
+++ b/mailnews/base/src/nsMsgBiffManager.cpp
@@ -17,7 +17,6 @@
#include "nsServiceManagerUtils.h"
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#define PREF_BIFF_JITTER "mail.biff.add_interval_jitter"
diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp
index f7856dd4d9..baad45ef5c 100644
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -43,7 +43,6 @@
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsMemory.h"
-#include "nsAlgorithm.h"
#include "nsIAbManager.h"
#include "nsIAbDirectory.h"
#include "nsIAbCard.h"
@@ -51,7 +50,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "nsTArray.h"
-#include <algorithm>
using namespace mozilla::mailnews;
nsrefcnt nsMsgDBView::gInstanceCount = 0;
diff --git a/mailnews/base/src/nsMsgFolderCompactor.cpp b/mailnews/base/src/nsMsgFolderCompactor.cpp
index 5224aef513..c20d54b0f9 100644
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -33,7 +33,6 @@
#include "nsIMsgFolderNotificationService.h"
#include "nsIMsgPluggableStore.h"
#include "nsMsgFolderCompactor.h"
-#include <algorithm>
#include "nsIOutputStream.h"
#include "nsIInputStream.h"
#include "nsPrintfCString.h"
diff --git a/mailnews/base/util/nsMsgCompressIStream.cpp b/mailnews/base/util/nsMsgCompressIStream.cpp
index 5b47422f29..b2a7013cf5 100644
--- a/mailnews/base/util/nsMsgCompressIStream.cpp
+++ b/mailnews/base/util/nsMsgCompressIStream.cpp
@@ -5,7 +5,6 @@
#include "nsMsgCompressIStream.h"
#include "prio.h"
#include "prmem.h"
-#include "nsAlgorithm.h"
#include <algorithm>
#define BUFFER_SIZE 16384
diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp
index 3a1a571e2a..81790c69a5 100644
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -63,7 +63,6 @@
#include "nsIPK11TokenDB.h"
#include "nsIPK11Token.h"
#include "nsMsgLocalFolderHdrs.h"
-#include <algorithm>
#define oneHour 3600000000U
#include "nsMsgUtils.h"
#include "nsIMsgFilterService.h"
diff --git a/mailnews/base/util/nsMsgLineBuffer.cpp b/mailnews/base/util/nsMsgLineBuffer.cpp
index 0a88cd8409..56f8a9504d 100644
--- a/mailnews/base/util/nsMsgLineBuffer.cpp
+++ b/mailnews/base/util/nsMsgLineBuffer.cpp
@@ -7,10 +7,8 @@
#include "prlog.h"
#include "prmem.h"
#include "nsMsgLineBuffer.h"
-#include "nsAlgorithm.h"
#include "nsMsgUtils.h"
#include "nsIInputStream.h" // used by nsMsgLineStreamBuffer
-#include <algorithm>
nsByteArray::nsByteArray()
{
diff --git a/mailnews/base/util/nsMsgMailNewsUrl.cpp b/mailnews/base/util/nsMsgMailNewsUrl.cpp
index 17f95fc30d..2c80cb6924 100644
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -25,7 +25,6 @@
#include <time.h>
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsProxyRelease.h"
#include "mozilla/BasePrincipal.h"
diff --git a/mailnews/base/util/nsMsgProtocol.cpp b/mailnews/base/util/nsMsgProtocol.cpp
index f2190cb453..c86995189c 100644
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -36,9 +36,7 @@
#include "nsIMsgIncomingServer.h"
#include "nsIInputStreamPump.h"
#include "nsMimeTypes.h"
-#include "nsAlgorithm.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsContentSecurityManager.h"
#undef PostMessage // avoid to collision with WinUser.h
diff --git a/mailnews/db/msgdb/src/nsMailDatabase.cpp b/mailnews/db/msgdb/src/nsMailDatabase.cpp
index b9202a4b20..9e7c152608 100644
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -8,7 +8,6 @@
#include "nsDBFolderInfo.h"
#include "nsMsgLocalFolderHdrs.h"
#include "nsNetUtil.h"
-#include "nsISeekableStream.h"
#include "nsMsgOfflineImapOperation.h"
#include "nsMsgFolderFlags.h"
#include "mozilla/Logging.h"
diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
index eb5f345f65..0b422b31dc 100644
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -37,13 +37,10 @@
#include "nsCollationCID.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
-#include "nsIMsgPluggableStore.h"
-#include "nsAlgorithm.h"
#include "nsArrayEnumerator.h"
#include "nsIMemoryReporter.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "mozilla/mailnews/Services.h"
-#include <algorithm>
using namespace mozilla::mailnews;
using namespace mozilla;
diff --git a/mailnews/db/msgdb/src/nsMsgHdr.cpp b/mailnews/db/msgdb/src/nsMsgHdr.cpp
index 1360794731..fd172024eb 100644
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -10,7 +10,6 @@
#include "nsMsgUtils.h"
#include "nsIMsgThread.h"
#include "nsMsgMimeCID.h"
-#include "nsIMimeConverter.h"
#include "mozilla/Attributes.h"
using namespace mozilla::mailnews;
diff --git a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
index 55383c828f..b98efdc5e4 100644
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -6,8 +6,6 @@
#include "nsMsgComposeSecure.h"
-#include <algorithm>
-
#include "ScopedNSSTypes.h"
#include "cert.h"
#include "keyhi.h"
@@ -16,7 +14,6 @@
#include "mozilla/mailnews/MimeEncoder.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "msgCore.h"
-#include "nsAlgorithm.h"
#include "nsComponentManagerUtils.h"
#include "nsICryptoHash.h"
#include "nsIMimeConverter.h"
diff --git a/mailnews/imap/src/nsIMAPNamespace.cpp b/mailnews/imap/src/nsIMAPNamespace.cpp
index d46352373b..2cba540160 100644
--- a/mailnews/imap/src/nsIMAPNamespace.cpp
+++ b/mailnews/imap/src/nsIMAPNamespace.cpp
@@ -12,6 +12,7 @@
#include "nsImapUrl.h"
#include "nsStringGlue.h"
#include "nsServiceManagerUtils.h"
+#include <algorithm>
//////////////////// nsIMAPNamespace /////////////////////////////////////////////////////////////
diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp
index 4ed12a0264..df222cb85d 100644
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -90,9 +90,7 @@
#include "nsMsgReadStateTxn.h"
#include "nsIStringEnumerator.h"
#include "nsIMsgStatusFeedback.h"
-#include "nsAlgorithm.h"
#include "nsMsgLineBuffer.h"
-#include <algorithm>
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsStringStream.h"
diff --git a/mailnews/imap/src/nsImapOfflineSync.cpp b/mailnews/imap/src/nsImapOfflineSync.cpp
index df31bd2995..2d86ce1b5f 100644
--- a/mailnews/imap/src/nsImapOfflineSync.cpp
+++ b/mailnews/imap/src/nsImapOfflineSync.cpp
@@ -23,9 +23,7 @@
#include "nsMsgUtils.h"
#include "nsIMutableArray.h"
#include "nsIAutoSyncManager.h"
-#include "nsAlgorithm.h"
#include "nsArrayUtils.h"
-#include <algorithm>
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp
index b671574acb..9114a28f2f 100644
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -38,7 +38,6 @@
#include "nsTextFormatter.h"
#include "nsIMsgHdr.h"
#include "nsMsgI18N.h"
-#include <algorithm>
// for the memory cache...
#include "nsICacheEntry.h"
#include "nsICacheStorage.h"
@@ -75,7 +74,6 @@ PRLogModuleInfo *IMAP;
#include "nsDebug.h"
#include "nsMsgCompressIStream.h"
#include "nsMsgCompressOStream.h"
-#include "nsAlgorithm.h"
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsIPrincipal.h"
diff --git a/mailnews/imap/src/nsImapUrl.cpp b/mailnews/imap/src/nsImapUrl.cpp
index d764379052..8fd9f2f657 100644
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -28,9 +28,7 @@
#include "nsMsgUtils.h"
#include "nsIMsgHdr.h"
#include "nsIProgressEventSink.h"
-#include "nsAlgorithm.h"
#include "nsServiceManagerUtils.h"
-#include <algorithm>
using namespace mozilla;
diff --git a/mailnews/import/outlook/src/MapiMessage.cpp b/mailnews/import/outlook/src/MapiMessage.cpp
index 52ec2e4c09..6b02db3145 100644
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -26,7 +26,6 @@
#include "MapiMimeTypes.h"
-#include <algorithm>
#include "nsMsgI18N.h"
#include "nsICharsetConverterManager.h"
#include "nsCRT.h"
diff --git a/mailnews/import/outlook/src/nsOutlookCompose.cpp b/mailnews/import/outlook/src/nsOutlookCompose.cpp
index eb47a29fd6..96c0824aa3 100644
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -43,7 +43,6 @@
#include "nsMsgMessageFlags.h"
#include "nsMsgLocalFolderHdrs.h"
-#include <algorithm>
static NS_DEFINE_CID(kMsgSendCID, NS_MSGSEND_CID);
static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
diff --git a/mailnews/import/text/src/nsTextAddress.cpp b/mailnews/import/text/src/nsTextAddress.cpp
index 6b0b82ed18..8a22498d2e 100644
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -21,7 +21,6 @@
#include "TextDebugLog.h"
#include "plstr.h"
#include "msgCore.h"
-#include <algorithm>
#ifndef MOZILLA_INTERNAL_API
#include "nsMsgI18N.h"
diff --git a/mailnews/intl/nsCharsetConverterManager.h b/mailnews/intl/nsCharsetConverterManager.h
index 3cc1f5830b..9d00542b2a 100644
--- a/mailnews/intl/nsCharsetConverterManager.h
+++ b/mailnews/intl/nsCharsetConverterManager.h
@@ -5,7 +5,6 @@
#ifndef nsCharsetConverterManager_h__
#define nsCharsetConverterManager_h__
-#include "nsISupports.h"
#include "nsICharsetConverterManager.h"
#define NS_DATA_BUNDLE_CATEGORY "uconv-charset-data"
diff --git a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
index 223eef4335..3395ab1c16 100644
--- a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
@@ -31,7 +31,6 @@
#include "nsMsgUtils.h"
#include "nsTextFormatter.h"
#include "mozilla/Services.h"
-#include <algorithm>
static PRLogModuleInfo * gMimeEmitterLogModule = nullptr;
diff --git a/mailnews/news/src/nsNNTPProtocol.cpp b/mailnews/news/src/nsNNTPProtocol.cpp
index c6b4c799b8..7c6314d523 100644
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -31,7 +31,6 @@
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "prprf.h"
-#include <algorithm>
/* include event sink interfaces for news */