Bug 1496518 - remove some unneeded includes in mailnews/. r=jorgk
authoraceman <acelists@atlas.sk>
Fri, 05 Oct 2018 11:29:00 +0200
changeset 24897 4aa20359173fc49b4ae3699985ba8696577f1cbe
parent 24896 86c4629ad6e4ef9f7710dbcfb5bb5b59d2073abd
child 24898 7ee3e492186abf5d064a0f16f41137fb7cfdaa86
push id14976
push usermozilla@jorgk.com
push dateFri, 05 Oct 2018 20:05:54 +0000
treeherdercomm-central@4aa20359173f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1496518
Bug 1496518 - remove some unneeded includes in mailnews/. r=jorgk
mailnews/addrbook/public/nsIAbAddressCollector.idl
mailnews/addrbook/public/nsIAbLDAPReplicationQuery.idl
mailnews/addrbook/public/nsIAbManager.idl
mailnews/addrbook/public/nsIAddrDBAnnouncer.idl
mailnews/addrbook/public/nsIAddrDBListener.idl
mailnews/addrbook/public/nsIAddrDatabase.idl
mailnews/addrbook/src/nsAbLDAPCard.h
mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
mailnews/addrbook/src/nsAbMDBDirProperty.h
mailnews/addrbook/src/nsAbOSXUtils.h
mailnews/db/msgdb/public/nsIMsgDatabase.idl
mailnews/db/msgdb/public/nsMailDatabase.h
mailnews/db/msgdb/public/nsMsgDatabase.h
mailnews/db/msgdb/public/nsNewsDatabase.h
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
mailnews/imap/src/nsImapMailFolder.h
mailnews/imap/src/nsImapService.cpp
mailnews/imap/src/nsImapUrl.cpp
mailnews/imap/src/nsImapUrl.h
mailnews/import/outlook/src/nsOutlookCompose.h
mailnews/import/public/nsIImportFieldMap.idl
mailnews/import/public/nsIImportFilters.idl
mailnews/import/src/nsImportFieldMap.h
mailnews/intl/nsCharsetConverterManager.cpp
mailnews/intl/nsICharsetConverterManager.idl
mailnews/local/src/nsParseMailbox.cpp
mailnews/local/src/nsParseMailbox.h
mailnews/mime/public/nsIMimeMiscStatus.idl
mailnews/mime/src/comi18n.cpp
mailnews/mime/src/mimeTextHTMLParsed.cpp
mailnews/mime/src/mimecms.h
mailnews/mime/src/mimei.h
mailnews/mime/src/mimemcms.h
mailnews/mime/test/TestMimeCrash.cpp
mailnews/news/src/nsNNTPNewsgroupList.cpp
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNewsUtils.h
mailnews/news/src/nsNntpIncomingServer.h
--- a/mailnews/addrbook/public/nsIAbAddressCollector.idl
+++ b/mailnews/addrbook/public/nsIAbAddressCollector.idl
@@ -1,17 +1,15 @@
 /* -*- Mode: IDL; 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 "nsISupports.idl"
 
-interface nsIAbCard;
-
 /**
  * nsIAbAddressCollector is the interface to the address collecter service.
  * It will save and update the supplied addresses into the address book
  * specified by the "mail.collect_addressbook" pref.
  */
 [scriptable, uuid(069d3fba-37d4-4158-b401-a8efaeea0b66)]
 interface nsIAbAddressCollector : nsISupports {
   /**
--- a/mailnews/addrbook/public/nsIAbLDAPReplicationQuery.idl
+++ b/mailnews/addrbook/public/nsIAbLDAPReplicationQuery.idl
@@ -1,19 +1,16 @@
 /* -*- 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 "nsISupports.idl"
 
 interface nsIWebProgressListener;
-interface nsILDAPURL;
-interface nsILDAPConnection;
-interface nsILDAPOperation;
 interface nsIAbLDAPDirectory;
 
 /**
  * this interface provides methods to perform LDAP Replication Queries
  */
 [scriptable, uuid(460a739c-a8c1-4f24-b705-c89d136ab9f5)]
 interface nsIAbLDAPReplicationQuery : nsISupports
 {
--- a/mailnews/addrbook/public/nsIAbManager.idl
+++ b/mailnews/addrbook/public/nsIAbManager.idl
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 #include "nsIAbListener.idl"
 
 interface mozIDOMWindowProxy;
 interface nsIAbDirectory;
 interface nsIAbCard;
-interface nsIAbDirectoryProperties;
 interface nsIFile;
 interface nsISimpleEnumerator;
 interface nsIAbBooleanExpression;
 
 /**
  * nsIAbManager is an interface to the main address book mananger
  * via the contract id "@mozilla.org/abmanager;1"
  *
--- a/mailnews/addrbook/public/nsIAddrDBAnnouncer.idl
+++ b/mailnews/addrbook/public/nsIAddrDBAnnouncer.idl
@@ -1,17 +1,18 @@
 /* -*- 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 "nsISupports.idl"
-#include "nsIAbCard.idl"
-#include "nsIAbDirectory.idl"
+
 
+interface nsIAbCard;
+interface nsIAbDirectory;
 interface nsIAddrDBListener;
 
 [scriptable, uuid(166b19a1-1235-4613-9601-816dedc48c9e)]
 interface nsIAddrDBAnnouncer : nsISupports {
 
   void addListener(in nsIAddrDBListener listener);
   void removeListener(in nsIAddrDBListener listener);
 
--- a/mailnews/addrbook/public/nsIAddrDBListener.idl
+++ b/mailnews/addrbook/public/nsIAddrDBListener.idl
@@ -1,17 +1,16 @@
 /* -*- 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 "nsISupports.idl"
-#include "nsIAbCard.idl"
-#include "nsIAbDirectory.idl"
 
-interface nsIAddrDBAnnouncer;
+interface nsIAbCard;
+interface nsIAbDirectory;
 
 [scriptable, uuid(5d7e5a7a-1ac9-46dc-abfd-758c98be26e9)]
 interface nsIAddrDBListener : nsISupports {
 
   void onCardAttribChange(in unsigned long abCode);
 
   /**
    * Handle the card entry change event.
--- a/mailnews/addrbook/public/nsIAddrDatabase.idl
+++ b/mailnews/addrbook/public/nsIAddrDatabase.idl
@@ -3,23 +3,20 @@
  * 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 "nsIAddrDBAnnouncer.idl"
 #include "nsIAbCard.idl"
 #include "nsIAbDirectory.idl"
 
 interface nsIFile;
-interface nsIMdbTableRowCursor;
-interface nsIMdbEnv;
 [ptr] native nsIMdbRow (nsIMdbRow);
 %{C++
 class nsIMdbRow;
 %}
-interface nsIArray;
 interface nsISimpleEnumerator;
 
 %{C++
 // this is the prefix we for attributes that are specific
 // to the mozilla addressbook, and weren't in 4.x and aren't specified in
 // RFC 2789.  used when exporting and import LDIF
 // see nsTextAddress.cpp, nsAddressBook.cpp
 #define MOZ_AB_LDIF_PREFIX "mozilla"
--- a/mailnews/addrbook/src/nsAbLDAPCard.h
+++ b/mailnews/addrbook/src/nsAbLDAPCard.h
@@ -5,18 +5,16 @@
 
 #ifndef nsAbLDAPCard_h__
 #define nsAbLDAPCard_h__
 
 #include "nsAbCardProperty.h"
 #include "nsIAbLDAPCard.h"
 #include "nsTArray.h"
 
-class nsIMutableArray;
-
 class nsAbLDAPCard : public nsAbCardProperty,
                      public nsIAbLDAPCard
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIABLDAPCARD
 
   nsAbLDAPCard();
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
@@ -1,14 +1,15 @@
 /* -*- 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 "nsAbLDAPDirectoryModify.h"
+#include "nsAbLDAPListenerBase.h"
 #include "nsILDAPMessage.h"
 #include "nsILDAPConnection.h"
 #include "nsILDAPErrors.h"
 #include "nsILDAPModification.h"
 #include "nsIAbLDAPDirectory.h"
 #include "nsIMutableArray.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
@@ -1,22 +1,19 @@
 /* -*- 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/. */
 
 #ifndef nsAbLDAPDirectoryModify_h__
 #define nsAbLDAPDirectoryModify_h__
 
-#include "nsAbLDAPListenerBase.h"
 #include "nsIAbLDAPDirectory.h"
 #include "nsIArray.h"
 
-class nsILDAPURL;
-
 class nsAbLDAPDirectoryModify
 {
 public:
   nsAbLDAPDirectoryModify();
   virtual ~nsAbLDAPDirectoryModify();
 
 protected:
   nsresult DoModify(nsIAbLDAPDirectory *directory,
--- a/mailnews/addrbook/src/nsAbMDBDirProperty.h
+++ b/mailnews/addrbook/src/nsAbMDBDirProperty.h
@@ -9,20 +9,17 @@
 
 *********************************************************************************************************/
 
 #ifndef nsAbMDBDirProperty_h__
 #define nsAbMDBDirProperty_h__
 
 #include "nsIAbMDBDirectory.h"
 #include "nsAbDirProperty.h"
-#include "nsIAbCard.h"
 #include "nsCOMPtr.h"
-#include "nsDirPrefs.h"
-#include "nsIAddrDatabase.h"
 
  /*
   * Address Book Directory
   */
 
 class nsAbMDBDirProperty: public nsIAbMDBDirectory, public nsAbDirProperty
 {
 public:
--- a/mailnews/addrbook/src/nsAbOSXUtils.h
+++ b/mailnews/addrbook/src/nsAbOSXUtils.h
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsAbOSXUtils_h___
 #define nsAbOSXUtils_h___
 
 #include <Foundation/NSString.h>
 #include "nsString.h"
 
-class nsAbCardProperty;
-
 NSString *WrapString(const nsString &aString);
 void AppendToString(const NSString *aString, nsString &aResult);
 void AssignToString(const NSString *aString, nsString &aResult);
 void AppendToCString(const NSString *aString, nsCString &aResult);
 
 struct nsAbOSXPropertyMap
 {
     NSString * const mOSXProperty;
--- a/mailnews/db/msgdb/public/nsIMsgDatabase.idl
+++ b/mailnews/db/msgdb/public/nsIMsgDatabase.idl
@@ -24,17 +24,16 @@
 #include "nsIDBChangeAnnouncer.idl"
 
 %{C++
 #include "nsTArray.h"
 %}
 
 interface nsIMutableArray;
 interface nsIMsgDatabase;
-interface nsIMsgDBView;
 interface nsIDBChangeListener;
 interface nsIMsgDBHdr;
 interface nsISimpleEnumerator;
 interface nsIMsgThread;
 interface nsIDBFolderInfo;
 interface nsIMsgOfflineImapOperation;
 interface nsIMsgFolder;
 interface nsIMsgKeyArray;
--- a/mailnews/db/msgdb/public/nsMailDatabase.h
+++ b/mailnews/db/msgdb/public/nsMailDatabase.h
@@ -4,23 +4,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _nsMailDatabase_H_
 #define _nsMailDatabase_H_
 
 #include "mozilla/Attributes.h"
 #include "nsMsgDatabase.h"
 #include "nsMsgMessageFlags.h"
+#include "nsTArray.h"
+
+#include "nsIDBChangeListener.h"
+#include "nsIMsgOfflineImapOperation.h"
+#include "nsISimpleEnumerator.h"
 #include "nsIFile.h"
-#include "nsTArray.h"
 
 // This is the subclass of nsMsgDatabase that handles local mail messages.
-class nsIOFileStream;
-class nsIFile;
-class nsOfflineImapOperation;
 
 class nsMailDatabase : public nsMsgDatabase
 {
 public:
   nsMailDatabase();
   virtual ~nsMailDatabase();
   NS_IMETHOD  ForceClosed() override;
   NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey* nsMsgKeys,
--- a/mailnews/db/msgdb/public/nsMsgDatabase.h
+++ b/mailnews/db/msgdb/public/nsMsgDatabase.h
@@ -25,22 +25,19 @@
 #include "nsIMimeConverter.h"
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "PLDHashTable.h"
 #include "nsTArray.h"
 #include "nsTObserverArray.h"
 #include "nsSimpleEnumerator.h"
 
-class ListContext;
-class nsMsgKeySet;
 class nsMsgThread;
 class nsMsgDatabase;
 class nsIMsgThread;
-class nsIDBFolderInfo;
 
 const int32_t kMsgDBVersion = 1;
 
 // Hopefully we're not opening up lots of databases at the same time, however
 // this will give us a buffer before we need to start reallocating the cache
 // array.
 const uint32_t kInitialMsgDBCacheSize = 20;
 
--- a/mailnews/db/msgdb/public/nsNewsDatabase.h
+++ b/mailnews/db/msgdb/public/nsNewsDatabase.h
@@ -4,20 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef _nsNewsDatabase_H_
 #define _nsNewsDatabase_H_
 
 #include "mozilla/Attributes.h"
 #include "nsMsgDatabase.h"
 #include "nsINewsDatabase.h"
 #include "nsTArray.h"
+#include "nsIMsgHdr.h"
 
-class nsIDBChangeListener;
-class MSG_RetrieveArtInfo;
-class MSG_PurgeInfo;
 // news group database
 
 class nsNewsDatabase : public nsMsgDatabase , public nsINewsDatabase
 {
 public:
   nsNewsDatabase();
 
   NS_DECL_ISUPPORTS_INHERITED
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
@@ -20,17 +20,16 @@
 #include "mozilla/ArenaAllocator.h"
 
 #define DEFAULT_MIN_INTERVAL_BETWEEN_WRITES             15*60*1000
 
 struct Token;
 class TokenEnumeration;
 class TokenAnalyzer;
 class nsIMsgWindow;
-class nsIMimeHeaders;
 class nsIUTF8StringEnumerator;
 struct BaseToken;
 struct CorpusToken;
 
 /**
  * Helper class to enumerate Token objects in a PLDHashTable
  * safely and without copying (see bugzilla #174859). The
  * enumeration is safe to use until an Add()
--- a/mailnews/imap/src/nsImapMailFolder.h
+++ b/mailnews/imap/src/nsImapMailFolder.h
@@ -20,17 +20,17 @@
 #include "nsIMsgFilterHitNotify.h"
 #include "nsIMsgFilterList.h"
 #include "prmon.h"
 #include "nsIMsgImapMailFolder.h"
 #include "nsIMsgThread.h"
 #include "nsIImapMailFolderSink.h"
 #include "nsIMsgFilterPlugin.h"
 #include "nsISimpleEnumerator.h"
-#include "nsIDirectoryEnumerator.h"
+#include "nsIStringEnumerator.h"
 #include "nsDataHashtable.h"
 #include "nsIMutableArray.h"
 #include "nsITimer.h"
 #include "nsCOMArray.h"
 #include "nsAutoSyncState.h"
 
 class nsImapMoveCoalescer;
 class nsIMsgIdentity;
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -9,16 +9,18 @@
 #include "nsImapCore.h"
 #include "netCore.h"
 
 #include "nsImapUrl.h"
 #include "nsCOMPtr.h"
 #include "nsIMsgFolder.h"
 #include "nsIMsgImapMailFolder.h"
 #include "nsIImapIncomingServer.h"
+#include "nsIImapMailFolderSink.h"
+#include "nsIImapMessageSink.h"
 #include "nsIImapServerSink.h"
 #include "nsIImapMockChannel.h"
 #include "nsImapUtils.h"
 #include "nsIMAPNamespace.h"
 #include "nsIDocShell.h"
 #include "nsIRDFService.h"
 #include "nsRDFCID.h"
 #include "nsIProgressEventSink.h"
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -12,16 +12,20 @@
 #include "nsString.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "prprf.h"
 #include "nsMemory.h"
 #include "nsCOMPtr.h"
 #include "nsMsgBaseCID.h"
 #include "nsImapUtils.h"
+#include "nsIImapMockChannel.h"
+#include "nsIImapMailFolderSink.h"
+#include "nsIImapMessageSink.h"
+#include "nsIImapServerSink.h"
 #include "nsIMAPNamespace.h"
 #include "nsICacheEntry.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgUtils.h"
 #include "nsIMsgHdr.h"
 #include "nsServiceManagerUtils.h"
 
 using namespace mozilla;
--- a/mailnews/imap/src/nsImapUrl.h
+++ b/mailnews/imap/src/nsImapUrl.h
@@ -5,21 +5,16 @@
 
 #ifndef nsImapUrl_h___
 #define nsImapUrl_h___
 
 #include "mozilla/Attributes.h"
 #include "nsIImapUrl.h"
 #include "nsCOMPtr.h"
 #include "nsMsgMailNewsUrl.h"
-#include "nsIImapMockChannel.h" // for the mockChannel attribute from .idl
-#include "nsIImapMailFolderSink.h" // for the imapMailFolderSink attribute from .idl
-#include "nsIImapServerSink.h" // for the imapServerSink attribute from .idl
-#include "nsIImapMessageSink.h" // for the imapMessageSink attribute from .idl
-
 #include "nsWeakPtr.h"
 #include "nsIFile.h"
 #include "mozilla/Mutex.h"
 
 class nsImapUrl : public nsIImapUrl, public nsMsgMailNewsUrl, public nsIMsgMessageUrl, public nsIMsgI18NUrl
 {
 public:
 
--- a/mailnews/import/outlook/src/nsOutlookCompose.h
+++ b/mailnews/import/outlook/src/nsOutlookCompose.h
@@ -6,22 +6,22 @@
 
 #ifndef nsOutlookCompose_h__
 #define nsOutlookCompose_h__
 
 #include "nscore.h"
 #include "nsString.h"
 #include "nsIFile.h"
 #include "nsIImportService.h"
+#include "nsIOutputStream.h"
 
 class nsIMsgSend;
 class nsIMsgCompFields;
 class nsIMsgIdentity;
 class nsIMsgSendListener;
-class nsIIOService;
 
 #include "nsIMsgSend.h"
 #include "nsNetUtil.h"
 
 #include "MapiMessage.h"
 
 #include <list>
 
--- a/mailnews/import/public/nsIImportFieldMap.idl
+++ b/mailnews/import/public/nsIImportFieldMap.idl
@@ -15,17 +15,16 @@
 
 #include "nsISupports.idl"
 
 interface nsIAddrDatabase;
 [ptr] native nsIMdbRow (nsIMdbRow);
 %{C++
 class nsIMdbRow;
 %}
-interface nsIAbCard;
 
 [scriptable, uuid(deee9264-1fe3-47b1-b745-47b22de454e2)]
 interface nsIImportFieldMap : nsISupports
 {
   /*
     Flag to indicate whether or not to skip the first record,
     for instance csv files often have field names as the first
     record
--- a/mailnews/import/public/nsIImportFilters.idl
+++ b/mailnews/import/public/nsIImportFilters.idl
@@ -4,29 +4,22 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
   Interface for importing filters.
 */
 
 #include "nsISupports.idl"
 
-interface nsIMsgAccount;
 interface nsIFile;
 
 [scriptable, uuid(f2680ccf-d110-4b5b-954d-e072d4a16129)]
 interface nsIImportFilters : nsISupports
 {
   boolean  AutoLocate( out wstring aDescription, out nsIFile aLocation);
 
   void     SetLocation( in nsIFile aLocation);
 
   /*
     Import filters and put any problems in the error out parameter.
   */
   boolean  Import( out wstring aError);
 };
-
-
-
-%{ C++
-
-%}
--- a/mailnews/import/src/nsImportFieldMap.h
+++ b/mailnews/import/src/nsImportFieldMap.h
@@ -6,17 +6,17 @@
 #ifndef nsImportFieldMap_h___
 #define nsImportFieldMap_h___
 
 #include "nscore.h"
 #include "nsIImportFieldMap.h"
 #include "nsIAddrDatabase.h" // For SetFieldValue() arguments
 #include "nsTArray.h"
 #include "nsString.h"
-
+#include "nsIStringBundle.h"
 
 ////////////////////////////////////////////////////////////////////////
 
 class nsIStringBundle;
 
 class nsImportFieldMap : public nsIImportFieldMap
 {
 public:
--- a/mailnews/intl/nsCharsetConverterManager.cpp
+++ b/mailnews/intl/nsCharsetConverterManager.cpp
@@ -5,17 +5,16 @@
 
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsCharsetAlias.h"
 #include "nsICharsetConverterManager.h"
 #include "nsIStringBundle.h"
 #include "nsTArray.h"
-#include "nsStringEnumerator.h"
 #include "mozilla/Services.h"
 
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "../base/util/nsMsgI18N.h"
 
 // just for CONTRACTIDs
 #include "nsCharsetConverterManager.h"
--- a/mailnews/intl/nsICharsetConverterManager.idl
+++ b/mailnews/intl/nsICharsetConverterManager.idl
@@ -10,18 +10,16 @@
 
 // XXX change to NS_CHARSETCONVERTERMANAGER_CID
 #define NS_ICHARSETCONVERTERMANAGER_CID \
   {0x3c1c0163, 0x9bd0, 0x11d3, { 0x9d, 0x9, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2}}
 
 #define NS_CHARSETCONVERTERMANAGER_CONTRACTID "@mozilla.org/charset-converter-manager;1"
 %}
 
-interface nsIUTF8StringEnumerator;
-
 [scriptable, uuid(a0550d46-8d9c-47dd-acc7-c083620dff12)]
 interface nsICharsetConverterManager : nsISupports
 {
     /**
      * A shortcut to calling nsICharsetAlias to do alias resolution
      * @throws if aCharset is an unknown charset.
      */
     ACString getCharsetAlias(in string aCharset);
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -29,17 +29,16 @@
 #include "nsRDFCID.h"
 #include "nsIRDFService.h"
 #include "nsMsgI18N.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsMsgUtils.h"
 #include "prprf.h"
 #include "prmem.h"
-#include "nsISeekableStream.h"
 #include "nsMsgSearchCore.h"
 #include "nsMailHeaders.h"
 #include "nsIMsgMailSession.h"
 #include "nsMsgCompCID.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsIMsgComposeService.h"
 #include "nsIMsgCopyService.h"
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -24,21 +24,16 @@
 #include "nsString.h"
 #include "nsIMsgFilterList.h"
 #include "nsIMsgFilter.h"
 #include "nsIMsgFilterHitNotify.h"
 #include "nsTArray.h"
 
 class nsByteArray;
 class nsOutputFileStream;
-class nsIOFileStream;
-class nsInputFileStream;
-class nsIMsgFilter;
-class MSG_FolderInfoMail;
-class nsIMsgFilterList;
 class nsIMsgFolder;
 
 /* Used for the various things that parse RFC822 headers...
  */
 typedef struct message_header
 {
   const char *value; /* The contents of a header (after ": ") */
   int32_t length;      /* The length of the data (it is not NULL-terminated.) */
--- a/mailnews/mime/public/nsIMimeMiscStatus.idl
+++ b/mailnews/mime/public/nsIMimeMiscStatus.idl
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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 "nsISupports.idl"
 #include "nsrootidl.idl"
 
-interface nsIChannel;
 interface nsIMsgMailNewsUrl;
 interface nsIUTF8StringEnumerator;
 interface nsIMsgDBHdr;
 interface nsIURI;
 interface nsIWritablePropertyBag2;
 
 [scriptable, uuid(4644FB25-5255-11d3-82B8-444553540002)]
 interface nsIMimeMiscStatus : nsISupports{
--- a/mailnews/mime/src/comi18n.cpp
+++ b/mailnews/mime/src/comi18n.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 4; 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 "comi18n.h"
 #include "nsICharsetDetector.h"
-#include "nsIStringCharsetDetector.h"
 #include "nsCyrillicDetector.h"
 #include "nsUniversalDetector.h"
 #include "nsUdetXPCOMWrapper.h"
 #include "nsMsgUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMsgMimeCID.h"
 #include "nsIMimeConverter.h"
--- a/mailnews/mime/src/mimeTextHTMLParsed.cpp
+++ b/mailnews/mime/src/mimeTextHTMLParsed.cpp
@@ -21,17 +21,16 @@
 #include "mimeTextHTMLParsed.h"
 #include "prmem.h"
 #include "prlog.h"
 #include "msgCore.h"
 #include "mozilla/dom/DOMParser.h"
 #include "nsIDocument.h"
 #include "nsIDocumentEncoder.h"
 #include "mozilla/ErrorResult.h"
-#include "nsIPrefBranch.h"
 #include "mimethtm.h"
 
 #define MIME_SUPERCLASS mimeInlineTextHTMLClass
 MimeDefClass(MimeInlineTextHTMLParsed, MimeInlineTextHTMLParsedClass,
              mimeInlineTextHTMLParsedClass, &MIME_SUPERCLASS);
 
 static int MimeInlineTextHTMLParsed_parse_line(const char *, int32_t,
                                                MimeObject *);
--- a/mailnews/mime/src/mimecms.h
+++ b/mailnews/mime/src/mimecms.h
@@ -3,17 +3,17 @@
  * 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/. */
 
 #ifndef _MIMECMS_H_
 #define _MIMECMS_H_
 
 #include "mimecryp.h"
 
-class nsICMSMessage;
+class nsICMSMessage; // for function arguments in mimecms.h
 
 /* The MimeEncryptedCMS class implements a type of MIME object where the
    object is passed through a CMS decryption engine to decrypt or verify
    signatures.  That module returns a new MIME object, which is then presented
    to the user.  See mimecryp.h for details of the general mechanism on which
    this is built.
  */
 
--- a/mailnews/mime/src/mimei.h
+++ b/mailnews/mime/src/mimei.h
@@ -199,20 +199,16 @@
  */
 
 #include "mimehdrs.h"
 #include "nsTArray.h"
 
 typedef struct MimeObject      MimeObject;
 typedef struct MimeObjectClass MimeObjectClass;
 
-#ifdef ENABLE_SMIME
-class nsICMSMessage;
-#endif // ENABLE_SMIME
-
 /* (I don't pretend to understand this.) */
 #define cpp_stringify_noop_helper(x)#x
 #define cpp_stringify(x) cpp_stringify_noop_helper(x)
 
 #define MimeObjectClassInitializer(ITYPE,CSUPER) \
   cpp_stringify(ITYPE), \
   sizeof(ITYPE), \
   (MimeObjectClass *) CSUPER, \
--- a/mailnews/mime/src/mimemcms.h
+++ b/mailnews/mime/src/mimemcms.h
@@ -3,17 +3,17 @@
  * 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/. */
 
 #ifndef _MIMEMPKC_H_
 #define _MIMEMPKC_H_
 
 #include "mimemsig.h"
 
-class nsICMSMessage;
+class nsICMSMessage; // for function arguments in mimemcms.h
 
 /* The MimeMultipartSignedCMS class implements a multipart/signed MIME
    container with protocol=application/x-CMS-signature, which passes the
    signed object through CMS code to verify the signature.  See mimemsig.h
    for details of the general mechanism on which this is built.
  */
 
 typedef struct MimeMultipartSignedCMSClass MimeMultipartSignedCMSClass;
--- a/mailnews/mime/test/TestMimeCrash.cpp
+++ b/mailnews/mime/test/TestMimeCrash.cpp
@@ -1,13 +1,10 @@
 // This is a crash test for Bug 556351
 
-#include "nsIServiceManager.h"
-#include "nsIComponentManager.h"
-#include "nsIComponentRegistrar.h"
 #include "nsCOMPtr.h"
 #include "nsIMimeConverter.h"
 #include "nsServiceManagerUtils.h"
 #include "nsMsgMimeCID.h"
 
 #include "prshma.h"
 #include "prsystem.h"
 
--- a/mailnews/news/src/nsNNTPNewsgroupList.cpp
+++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp
@@ -45,17 +45,16 @@
 #include "nsNewsUtils.h"
 
 #include "nsMsgDBCID.h"
 
 #include "nsINewsDownloadDialogArgs.h"
 
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
-#include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIMsgWindow.h"
 #include "nsIDocShell.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
 #include "nsIMsgFolderNotificationService.h"
 #include "nsIMsgFilterCustomAction.h"
 #include "nsComponentManagerUtils.h"
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -31,26 +31,24 @@
 #include "nsCOMPtr.h"
 #include "nsIMsgIncomingServer.h"
 #include "nsINntpIncomingServer.h"
 #include "nsINewsDatabase.h"
 #include "nsMsgBaseCID.h"
 #include "nsILineInputStream.h"
 
 #include "nsIMsgWindow.h"
-#include "nsIPrompt.h"
 #include "nsIWindowWatcher.h"
 
 #include "nsNetUtil.h"
 #include "nsIAuthPrompt.h"
 #include "nsIURL.h"
 #include "nsNetCID.h"
 #include "nsINntpUrl.h"
 
-#include "nsIInterfaceRequestor.h"
 #include "nsArrayEnumerator.h"
 #include "nsNewsDownloader.h"
 #include "nsIStringBundle.h"
 #include "nsMsgI18N.h"
 #include "nsNativeCharsetUtils.h"
 
 #include "nsIMsgFolderNotificationService.h"
 #include "nsIMutableArray.h"
--- a/mailnews/news/src/nsNewsUtils.h
+++ b/mailnews/news/src/nsNewsUtils.h
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef NS_NEWSUTILS_H
 #define NS_NEWSUTILS_H
 
 #include "nsString.h"
 #include "MailNewsTypes2.h"
 
-class nsIMsgNewsFolder;
-
 #define kNewsRootURI "news:/"
 #define kNntpRootURI "nntp:/"
 #define kNewsMessageRootURI "news-message:/"
 #define kNewsURIGroupQuery "?group="
 #define kNewsURIKeyQuery "&key="
 
 #define kNewsRootURILen 6
 #define kNntpRootURILen 6
--- a/mailnews/news/src/nsNntpIncomingServer.h
+++ b/mailnews/news/src/nsNntpIncomingServer.h
@@ -23,19 +23,16 @@
 #include "nsITreeView.h"
 #include "nsITreeSelection.h"
 #include "nsCOMArray.h"
 #include "nsTArray.h"
 
 #include "nsNntpMockChannel.h"
 #include "nsAutoPtr.h"
 
-class nsINntpUrl;
-class nsIMsgMailNewsUrl;
-
 /* get some implementation from nsMsgIncomingServer */
 class nsNntpIncomingServer : public nsMsgIncomingServer,
                              public nsINntpIncomingServer,
                              public nsIUrlListener,
                              public nsISubscribableServer,
                              public nsITreeView
 
 {