Bug 1610605 - remove use of nsAutoPtr from C-C: Part 1: Remove unneeded includes. r=me
authorJorg K <jorgk@jorgk.com>
Tue, 21 Jan 2020 21:28:20 +0100
changeset 37987 61106214bab978442d9db6b0d4d3a3e8969bf387
parent 37986 c5d3c34a34c9065caf1bad63dc0239f0dd71868f
child 37988 81cf5d6780d7f5312504d6749990093ac8df5a66
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersme
bugs1610605
Bug 1610605 - remove use of nsAutoPtr from C-C: Part 1: Remove unneeded includes. r=me
calendar/base/backend/libical/calUtils.h
ldap/xpcom/src/nsLDAPConnection.h
mail/components/search/nsMailWinSearchHelper.cpp
mailnews/addrbook/src/nsAbOSXCard.mm
mailnews/addrbook/src/nsAbOSXDirectory.mm
mailnews/addrbook/src/nsAddbookUrl.cpp
mailnews/addrbook/src/nsAddrDatabase.cpp
mailnews/base/search/src/nsMsgFilterService.cpp
mailnews/base/search/src/nsMsgSearchSession.cpp
mailnews/base/src/nsMessengerUnixIntegration.cpp
mailnews/base/src/nsMsgAccountManager.h
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/compose/src/nsSmtpService.cpp
mailnews/compose/src/nsSmtpUrl.cpp
mailnews/compose/src/nsURLFetcher.h
mailnews/db/msgdb/public/nsMsgDatabase.h
mailnews/db/msgdb/public/nsMsgThread.h
mailnews/db/msgdb/src/nsMsgHdr.cpp
mailnews/imap/src/nsAutoSyncManager.h
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapMailFolder.h
mailnews/imap/src/nsImapProtocol.h
mailnews/imap/src/nsImapServerResponseParser.h
mailnews/import/outlook/src/nsOutlookCompose.cpp
mailnews/jsaccount/src/JaAbDirectory.h
mailnews/jsaccount/src/JaCompose.h
mailnews/jsaccount/src/JaIncomingServer.h
mailnews/jsaccount/src/JaMsgFolder.h
mailnews/jsaccount/src/JaSend.h
mailnews/jsaccount/src/JaUrl.h
mailnews/local/src/nsLocalMailFolder.h
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsMsgBrkMBoxStore.cpp
mailnews/local/src/nsMsgMaildirStore.cpp
mailnews/local/src/nsParseMailbox.h
mailnews/local/src/nsPop3IncomingServer.cpp
mailnews/local/src/nsPop3Sink.h
mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
mailnews/mime/src/MimeHeaderParser.cpp
mailnews/mime/src/mimecms.cpp
mailnews/mime/src/nsSimpleMimeConverterStub.cpp
mailnews/news/src/nsNNTPArticleList.cpp
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNntpIncomingServer.h
--- a/calendar/base/backend/libical/calUtils.h
+++ b/calendar/base/backend/libical/calUtils.h
@@ -2,17 +2,16 @@
  * 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/. */
 #if !defined(INCLUDED_CAL_UTILS_H)
 #  define INCLUDED_CAL_UTILS_H
 
 #  include "nsCRT.h"
 #  include "nsString.h"
 
-#  include "nsAutoPtr.h"
 #  include "nsIStringEnumerator.h"
 
 #  include "calITimezone.h"
 #  include "calITimezoneProvider.h"
 #  include "calIICSService.h"
 #  include "nsIConsoleService.h"
 #  include "nsServiceManagerUtils.h"
 #  include "nsIClassInfoImpl.h"
--- a/ldap/xpcom/src/nsLDAPConnection.h
+++ b/ldap/xpcom/src/nsLDAPConnection.h
@@ -17,17 +17,16 @@
 #include "nsInterfaceHashtable.h"
 #include "nspr.h"
 #include "nsWeakReference.h"
 #include "nsIDNSListener.h"
 #include "nsICancelable.h"
 #include "nsIRequest.h"
 #include "nsCOMArray.h"
 #include "nsIObserver.h"
-#include "nsAutoPtr.h"
 #include "mozilla/Mutex.h"
 
 /**
  * Casting nsILDAPConnection to nsISupports is ambiguous.
  * This method handles that.
  */
 inline nsISupports *ToSupports(nsILDAPConnection *p) {
   return NS_ISUPPORTS_CAST(nsILDAPConnection *, p);
--- a/mail/components/search/nsMailWinSearchHelper.cpp
+++ b/mail/components/search/nsMailWinSearchHelper.cpp
@@ -1,16 +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 "nsMailWinSearchHelper.h"
 #include "nsDirectoryServiceUtils.h"
-#include "nsAutoPtr.h"
 #include "nsString.h"
 #include "nsIDirectoryEnumerator.h"
 #include "mozilla/ArrayUtils.h"
 
 #ifdef _WIN32_WINNT
 #  undef _WIN32_WINNT
 #endif
 #define _WIN32_WINNT 0x0600
--- a/mailnews/addrbook/src/nsAbOSXCard.mm
+++ b/mailnews/addrbook/src/nsAbOSXCard.mm
@@ -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 "nsAbOSXCard.h"
 #include "nsAbOSXDirectory.h"
 #include "nsAbOSXUtils.h"
-#include "nsAutoPtr.h"
 #include "nsIAbManager.h"
 #include "nsObjCExceptions.h"
 #include "nsServiceManagerUtils.h"
 
 #include <AddressBook/AddressBook.h>
 
 NS_IMPL_ISUPPORTS_INHERITED(nsAbOSXCard, nsAbCardProperty, nsIAbOSXCard)
 
--- a/mailnews/addrbook/src/nsAbOSXDirectory.mm
+++ b/mailnews/addrbook/src/nsAbOSXDirectory.mm
@@ -3,17 +3,16 @@
  * 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 "nsAbOSXDirectory.h"
 #include "nsAbOSXCard.h"
 #include "nsAbOSXUtils.h"
 #include "nsAbQueryStringToExpression.h"
 #include "nsArrayEnumerator.h"
-#include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsEnumeratorUtils.h"
 #include "nsIAbDirectoryQueryProxy.h"
 #include "nsIAbManager.h"
 #include "nsObjCExceptions.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
--- a/mailnews/addrbook/src/nsAddbookUrl.cpp
+++ b/mailnews/addrbook/src/nsAddbookUrl.cpp
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIURI.h"
 #include "nsNetCID.h"
 #include "nsAddbookUrl.h"
 #include "nsString.h"
 #include "nsAbBaseCID.h"
 #include "nsComponentManagerUtils.h"
-#include "nsAutoPtr.h"
 #include "mozilla/Encoding.h"
 
 /////////////////////////////////////////////////////////////////////////////////////
 // addbook url definition
 /////////////////////////////////////////////////////////////////////////////////////
 nsAddbookUrl::nsAddbookUrl() {
   mOperationType = nsIAddbookUrlOperation::InvalidUrl;
 }
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -2,17 +2,16 @@
 /* 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/. */
 
 // this file implements the nsAddrDatabase interface using the MDB Interface.
 
 #include "nsAddrDatabase.h"
 #include "nsString.h"
-#include "nsAutoPtr.h"
 #include "nsUnicharUtils.h"
 #include "nsAbBaseCID.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMsgUtils.h"
 #include "nsMorkCID.h"
 #include "nsIMdbFactoryFactory.h"
 #include "prprf.h"
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -38,17 +38,16 @@
 #include "nsCOMArray.h"
 #include "nsIMsgFilterCustomAction.h"
 #include "nsArrayEnumerator.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMsgWindow.h"
 #include "nsIMsgSearchCustomTerm.h"
 #include "nsIMsgSearchTerm.h"
 #include "nsIMsgThread.h"
-#include "nsAutoPtr.h"
 #include "nsIMsgFilter.h"
 #include "nsIMsgOperationListener.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla;
 
 LazyLogModule FILTERLOGMODULE("Filters");
--- a/mailnews/base/search/src/nsMsgSearchSession.cpp
+++ b/mailnews/base/search/src/nsMsgSearchSession.cpp
@@ -16,17 +16,16 @@
 #include "nsMsgUtils.h"
 #include "nsIMsgSearchNotify.h"
 #include "nsIMsgMailSession.h"
 #include "nsMsgBaseCID.h"
 #include "nsMsgFolderFlags.h"
 #include "nsMsgLocalSearch.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
-#include "nsAutoPtr.h"
 
 NS_IMPL_ISUPPORTS(nsMsgSearchSession, nsIMsgSearchSession, nsIUrlListener,
                   nsISupportsWeakReference)
 
 nsMsgSearchSession::nsMsgSearchSession() {
   m_sortAttribute = nsMsgSearchAttrib::Sender;
   m_idxRunningScope = 0;
   m_handlingError = false;
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -28,17 +28,16 @@
 #include "prprf.h"
 #include "nsIStringBundle.h"
 #include "nsIAlertsService.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIMsgDatabase.h"
 #include "nsIMsgHdr.h"
-#include "nsAutoPtr.h"
 #include "prmem.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIWeakReferenceUtils.h"
 
 #include "nsNativeCharsetUtils.h"
 #include "nsToolkitCompsCID.h"
 #include "nsMsgUtils.h"
--- a/mailnews/base/src/nsMsgAccountManager.h
+++ b/mailnews/base/src/nsMsgAccountManager.h
@@ -22,17 +22,16 @@
 #include "nsIObserver.h"
 #include "nsWeakReference.h"
 #include "nsIUrlListener.h"
 #include "nsCOMArray.h"
 #include "nsIMsgSearchSession.h"
 #include "nsInterfaceHashtable.h"
 #include "nsIMsgDatabase.h"
 #include "nsIDBChangeListener.h"
-#include "nsAutoPtr.h"
 #include "nsTObserverArray.h"
 
 class VirtualFolderChangeListener final : public nsIDBChangeListener {
  public:
   VirtualFolderChangeListener();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDBCHANGELISTENER
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -23,17 +23,16 @@
 #include "nsIMsgFilterPlugin.h"
 #include "nsIStringBundle.h"
 #include "nsMsgTagService.h"
 #include "nsCOMArray.h"
 #include "nsTArray.h"
 #include "nsTHashtable.h"
 #include "nsHashKeys.h"
 #include "nsIMsgCustomColumnHandler.h"
-#include "nsAutoPtr.h"
 #include "nsIWeakReferenceUtils.h"
 #include "nsSimpleEnumerator.h"
 #define MESSENGER_STRING_URL "chrome://messenger/locale/messenger.properties"
 
 typedef AutoTArray<nsMsgViewIndex, 1> nsMsgViewIndexArray;
 static_assert(nsMsgViewIndex(nsMsgViewIndexArray::NoIndex) ==
                   nsMsgViewIndex_None,
               "These need to be the same value.");
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -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 "msgCore.h"  // precompiled header...
 #include "nsCOMPtr.h"
 #include "nsIMsgFolder.h"
-#include "nsAutoPtr.h"
 #include "nsIFile.h"
 #include "nsNetUtil.h"
 #include "nsIMsgHdr.h"
 #include "nsIChannel.h"
 #include "nsIStreamListener.h"
 #include "nsIMsgMessageService.h"
 #include "nsMsgDBCID.h"
 #include "nsMsgUtils.h"
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -22,17 +22,16 @@
 #include "nsMsgUtils.h"
 #include "nsIWebProgress.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsMsgPrintEngine.h"
 #include "nsIDocumentLoader.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsThreadUtils.h"
-#include "nsAutoPtr.h"
 #include "mozilla/Services.h"
 #include "mozilla/dom/LoadURIOptionsBinding.h"
 
 // Interfaces Needed
 #include "nsIBaseWindow.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIWebNavigation.h"
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -5,16 +5,17 @@
 
 #include "msgCore.h"
 #include "nsIMsgHdr.h"
 #include "nsMsgUtils.h"
 #include "nsMsgFolderFlags.h"
 #include "nsMsgMessageFlags.h"
 #include "nsString.h"
 #include "nsIServiceManager.h"
+#include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsIFolderLookupService.h"
 #include "nsIImapUrl.h"
 #include "nsIMailboxUrl.h"
 #include "nsINntpUrl.h"
 #include "nsMsgNewsCID.h"
 #include "nsMsgLocalCID.h"
 #include "nsMsgBaseCID.h"
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -16,17 +16,16 @@
 #include "nsMsgCompCID.h"
 #include "nsArrayEnumerator.h"
 #include "nsSmtpUrl.h"
 #include "nsSmtpProtocol.h"
 #include "nsCOMPtr.h"
 #include "nsIMsgIdentity.h"
 #include "nsIPrompt.h"
 #include "nsIWindowWatcher.h"
-#include "nsAutoPtr.h"
 #include "nsComposeStrings.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIPrincipal.h"
 
 #define SERVER_DELIMITER ','
 #define APPEND_SERVERS_VERSION_PREF_NAME "append_preconfig_smtpservers.version"
 #define MAIL_ROOT_PREF "mail."
 #define PREF_MAIL_SMTPSERVERS "mail.smtpservers"
--- a/mailnews/compose/src/nsSmtpUrl.cpp
+++ b/mailnews/compose/src/nsSmtpUrl.cpp
@@ -10,17 +10,16 @@
 #include "nsSmtpUrl.h"
 #include "nsString.h"
 #include "nsMsgUtils.h"
 #include "nsIMimeConverter.h"
 #include "nsMsgMimeCID.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsCRT.h"
-#include "nsAutoPtr.h"
 #include "mozilla/Encoding.h"
 
 /////////////////////////////////////////////////////////////////////////////////////
 // mailto url definition
 /////////////////////////////////////////////////////////////////////////////////////
 nsMailtoUrl::nsMailtoUrl() { mFormat = nsIMsgCompFormat::Default; }
 
 nsMailtoUrl::~nsMailtoUrl() {}
--- a/mailnews/compose/src/nsURLFetcher.h
+++ b/mailnews/compose/src/nsURLFetcher.h
@@ -3,17 +3,16 @@
  * 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 nsURLFetcher_h_
 #define nsURLFetcher_h_
 
 #include "nsIURLFetcher.h"
 
 #include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
 #include "nsIInputStream.h"
 #include "nsIStreamListener.h"
 
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsCURILoader.h"
 #include "nsIURIContentListener.h"
 #include "nsIWebProgressListener.h"
--- a/mailnews/db/msgdb/public/nsMsgDatabase.h
+++ b/mailnews/db/msgdb/public/nsMsgDatabase.h
@@ -8,17 +8,16 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Path.h"
 #include "nsIFile.h"
 #include "nsIMsgDatabase.h"
 #include "nsMsgHdr.h"
 #include "nsString.h"
-#include "nsAutoPtr.h"
 #include "nsIDBChangeListener.h"
 #include "nsIDBChangeAnnouncer.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMsgFolder.h"
 #include "nsIMutableArray.h"
 #include "nsDBFolderInfo.h"
 #include "nsICollation.h"
 #include "nsIMsgSearchSession.h"
--- a/mailnews/db/msgdb/public/nsMsgThread.h
+++ b/mailnews/db/msgdb/public/nsMsgThread.h
@@ -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/. */
 
 #ifndef _nsMsgThread_H
 #define _nsMsgThread_H
 
-#include "nsAutoPtr.h"
 #include "nsIMsgThread.h"
 #include "nsString.h"
 #include "MailNewsTypes.h"
 #include "mdb.h"
 
 class nsIMdbTable;
 class nsIMsgDBHdr;
 class nsMsgDatabase;
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -851,17 +851,16 @@ NS_IMETHODIMP nsMsgHdr::GetIsKilled(bool
   // so tell IsAncestorKilled to only check numChildren - 1 ancestors.
   *isKilled = IsAncestorKilled(numChildren - 1);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #include "nsIStringEnumerator.h"
-#include "nsAutoPtr.h"
 #define NULL_MORK_COLUMN 0
 class nsMsgPropertyEnumerator : public nsStringEnumeratorBase {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 
   using nsStringEnumeratorBase::GetNext;
 
--- a/mailnews/imap/src/nsAutoSyncManager.h
+++ b/mailnews/imap/src/nsAutoSyncManager.h
@@ -1,16 +1,15 @@
 /* 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 nsAutoSyncManager_h__
 #  define nsAutoSyncManager_h__
 
-#  include "nsAutoPtr.h"
 #  include "nsString.h"
 #  include "nsCOMArray.h"
 #  include "nsIObserver.h"
 #  include "nsIUrlListener.h"
 #  include "nsITimer.h"
 #  include "nsTObserverArray.h"
 #  include "nsIAutoSyncManager.h"
 #  include "nsIAutoSyncMsgStrategy.h"
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -7,17 +7,16 @@
 #include "msgCore.h"
 #include "prmem.h"
 #include "nsMsgImapCID.h"
 #include "nsImapMailFolder.h"
 #include "nsIImapService.h"
 #include "nsIFile.h"
 #include "nsIUrlListener.h"
 #include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
 #include "nsMsgDBCID.h"
 #include "nsMsgFolderFlags.h"
 #include "nsISeekableStream.h"
 #include "nsThreadUtils.h"
 #include "nsIImapUrl.h"
 #include "nsImapUtils.h"
 #include "nsMsgUtils.h"
 #include "nsIMsgMailSession.h"
--- a/mailnews/imap/src/nsImapMailFolder.h
+++ b/mailnews/imap/src/nsImapMailFolder.h
@@ -7,17 +7,16 @@
 
 #include "mozilla/Attributes.h"
 #include "nsImapCore.h"  // so that consumers including ImapMailFolder.h also get the kImapMsg* constants
 #include "nsMsgDBFolder.h"
 #include "nsIImapMailFolderSink.h"
 #include "nsIImapMessageSink.h"
 #include "nsICopyMessageListener.h"
 #include "nsIUrlListener.h"
-#include "nsAutoPtr.h"
 #include "nsIImapIncomingServer.h"  // we need this for its IID
 #include "nsIMsgParseMailMsgState.h"
 #include "nsImapUndoTxn.h"
 #include "nsIMsgMessageService.h"
 #include "nsIMsgFilterHitNotify.h"
 #include "nsIMsgFilterList.h"
 #include "prmon.h"
 #include "nsIMsgImapMailFolder.h"
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -37,17 +37,16 @@
 #include "nsIRunnable.h"
 #include "nsIImapMockChannel.h"
 #include "nsILoadGroup.h"
 #include "nsCOMPtr.h"
 #include "nsIMsgWindow.h"
 #include "nsIImapHeaderXferInfo.h"
 #include "nsMsgLineBuffer.h"
 #include "nsIAsyncInputStream.h"
-#include "nsAutoPtr.h"
 #include "nsIMsgFolder.h"
 #include "nsIMsgAsyncPrompter.h"
 #include "mozilla/ReentrantMonitor.h"
 #include "nsSyncRunnableHelpers.h"
 #include "nsICacheEntryOpenCallback.h"
 #include "nsIProtocolProxyCallback.h"
 #include "nsIStringBundle.h"
 
--- a/mailnews/imap/src/nsImapServerResponseParser.h
+++ b/mailnews/imap/src/nsImapServerResponseParser.h
@@ -8,17 +8,16 @@
 
 #include "mozilla/Attributes.h"
 #include "nsIIMAPHostSessionList.h"
 #include "nsImapSearchResults.h"
 #include "nsString.h"
 #include "MailNewsTypes.h"
 #include "nsTArray.h"
 #include "nsImapUtils.h"
-#include "nsAutoPtr.h"
 
 class nsIMAPBodyShell;
 class nsIMAPBodypart;
 class nsImapSearchResultIterator;
 class nsIImapFlagAndUidState;
 
 #include "nsIMAPGenericParser.h"
 
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -28,17 +28,16 @@
 #include "nsCRT.h"
 #include "nsOutlookCompose.h"
 
 #include "ImportDebug.h"
 
 #include "nsMimeTypes.h"
 #include "nsMsgUtils.h"
 
-#include "nsAutoPtr.h"
 #include "nsIThread.h"
 #include "nsThreadUtils.h"
 
 #include "nsMsgMessageFlags.h"
 #include "nsMsgLocalFolderHdrs.h"
 
 static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
 
--- a/mailnews/jsaccount/src/JaAbDirectory.h
+++ b/mailnews/jsaccount/src/JaAbDirectory.h
@@ -7,17 +7,16 @@
 #ifndef _JaAbDirectory_H_
 #define _JaAbDirectory_H_
 
 #include "nsISupports.h"
 #include "DelegateList.h"
 #include "msgIOverride.h"
 #include "nsIAbDirectory.h"
 #include "nsAbDirProperty.h"
-#include "nsAutoPtr.h"
 #include "nsDataHashtable.h"
 #include "nsIInterfaceRequestor.h"
 
 namespace mozilla {
 namespace mailnews {
 
 /* Header file */
 
--- a/mailnews/jsaccount/src/JaCompose.h
+++ b/mailnews/jsaccount/src/JaCompose.h
@@ -7,17 +7,16 @@
 #ifndef _JaCompose_H_
 #define _JaCompose_H_
 
 #include "nsISupports.h"
 #include "DelegateList.h"
 #include "msgIOverride.h"
 #include "nsMsgCompose.h"
 #include "nsIMsgCompose.h"
-#include "nsAutoPtr.h"
 #include "nsDataHashtable.h"
 #include "nsIInterfaceRequestor.h"
 
 // This file specifies the definition of nsIMsgCompose.idl objects
 // in the JsAccount system.
 
 namespace mozilla {
 namespace mailnews {
--- a/mailnews/jsaccount/src/JaIncomingServer.h
+++ b/mailnews/jsaccount/src/JaIncomingServer.h
@@ -7,17 +7,16 @@
 #ifndef _JaIncomingServer_H_
 #define _JaIncomingServer_H_
 
 #include "nsISupports.h"
 #include "DelegateList.h"
 #include "msgIOverride.h"
 #include "nsIMsgIncomingServer.h"
 #include "nsMsgIncomingServer.h"
-#include "nsAutoPtr.h"
 #include "nsDataHashtable.h"
 #include "nsIInterfaceRequestor.h"
 
 // This file specifies the definition of nsIMsgIncomingServer.idl objects
 // in the JsAccount system.
 
 namespace mozilla {
 namespace mailnews {
--- a/mailnews/jsaccount/src/JaMsgFolder.h
+++ b/mailnews/jsaccount/src/JaMsgFolder.h
@@ -7,17 +7,16 @@
 #ifndef _JaMsgFolder_H_
 #define _JaMsgFolder_H_
 
 #include "nsISupports.h"
 #include "DelegateList.h"
 #include "msgIOverride.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgDBFolder.h"
-#include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDataHashtable.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsNetUtil.h"
 #include "nsIDBChangeListener.h"
 #include "nsIUrlListener.h"
 #include "nsIMsgFilterPlugin.h"
 #include "nsIInterfaceRequestor.h"
--- a/mailnews/jsaccount/src/JaSend.h
+++ b/mailnews/jsaccount/src/JaSend.h
@@ -7,17 +7,16 @@
 #ifndef _JaSend_H_
 #define _JaSend_H_
 
 #include "nsISupports.h"
 #include "DelegateList.h"
 #include "msgIOverride.h"
 #include "nsIMsgSend.h"
 #include "nsMsgSend.h"
-#include "nsAutoPtr.h"
 #include "nsDataHashtable.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIMsgOperationListener.h"
 
 // This file specifies the definition of nsIMsgSend.idl objects
 // in the JsAccount system.
 
 namespace mozilla {
--- a/mailnews/jsaccount/src/JaUrl.h
+++ b/mailnews/jsaccount/src/JaUrl.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _JaUrl_H_
 #define _JaUrl_H_
 
 #include "DelegateList.h"
 #include "msgCore.h"
 #include "msgIOverride.h"
-#include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDataHashtable.h"
 #include "nsIFile.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIMsgFolder.h"
 #include "nsISupports.h"
 #include "nsIURI.h"
 #include "nsIURL.h"
--- a/mailnews/local/src/nsLocalMailFolder.h
+++ b/mailnews/local/src/nsLocalMailFolder.h
@@ -7,17 +7,16 @@
    Interface for representing Local Mail folders.
 */
 
 #ifndef nsMsgLocalMailFolder_h__
 #define nsMsgLocalMailFolder_h__
 
 #include "mozilla/Attributes.h"
 #include "nsMsgDBFolder.h" /* include the interface we are going to support */
-#include "nsAutoPtr.h"
 #include "nsICopyMessageListener.h"
 #include "nsMsgTxn.h"
 #include "nsIMsgMessageService.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsIMsgFolder.h"
 #include "nsIMsgWindow.h"
 #include "nsIMsgDatabase.h"
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -24,17 +24,16 @@
 #include "nsMailDirServiceDefs.h"
 #include "nsMsgUtils.h"
 
 #include "nsCOMPtr.h"
 #include "nsMsgFolderFlags.h"
 
 #include "nsILineInputStream.h"
 #include "nsNetUtil.h"
-#include "nsAutoPtr.h"
 #include "nsIStringBundle.h"
 #include "nsIMsgPluggableStore.h"
 #include "mozilla/Services.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 
 #include "mozilla/Logging.h"
 // export MOZ_LOG_MODULES=Movemail:5
--- a/mailnews/local/src/nsMsgBrkMBoxStore.cpp
+++ b/mailnews/local/src/nsMsgBrkMBoxStore.cpp
@@ -9,16 +9,17 @@
 
 #include "prlog.h"
 #include "msgCore.h"
 #include "nsMsgBrkMBoxStore.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgFolderFlags.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMsgLocalMailFolder.h"
+#include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsIFile.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsIMsgHdr.h"
 #include "nsNetUtil.h"
 #include "nsIMsgDatabase.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsMsgUtils.h"
--- a/mailnews/local/src/nsMsgMaildirStore.cpp
+++ b/mailnews/local/src/nsMsgMaildirStore.cpp
@@ -11,16 +11,17 @@
 #include "mozilla/Logging.h"
 #include "msgCore.h"
 #include "nsMsgMaildirStore.h"
 #include "nsIMsgFolder.h"
 #include "nsIMsgFolderNotificationService.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsMsgFolderFlags.h"
+#include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsIFile.h"
 #include "nsNetUtil.h"
 #include "nsIMsgDatabase.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsMsgUtils.h"
 #include "nsMsgDBCID.h"
 #include "nsIDBFolderInfo.h"
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -15,17 +15,16 @@
 #include "nsIMsgHdr.h"
 #include "nsIMsgStatusFeedback.h"
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsIDBChangeListener.h"
 #include "nsIWeakReferenceUtils.h"
 #include "nsIMsgWindow.h"
 #include "nsImapMoveCoalescer.h"
-#include "nsAutoPtr.h"
 #include "nsString.h"
 #include "nsIMsgFilterList.h"
 #include "nsIMsgFilter.h"
 #include "nsIMsgFilterHitNotify.h"
 #include "nsTArray.h"
 
 class nsByteArray;
 class nsOutputFileStream;
--- a/mailnews/local/src/nsPop3IncomingServer.cpp
+++ b/mailnews/local/src/nsPop3IncomingServer.cpp
@@ -10,17 +10,16 @@
 #include "nsCOMPtr.h"
 #include "nsIPop3IncomingServer.h"
 #include "nsPop3IncomingServer.h"
 #include "nsIPop3Service.h"
 #include "nsMsgBaseCID.h"
 #include "nsMsgLocalCID.h"
 #include "nsMsgFolderFlags.h"
 #include "nsPop3Protocol.h"
-#include "nsAutoPtr.h"
 #include "nsMsgKeyArray.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsIMsgAccountManager.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsMsgUtils.h"
 #include "nsMsgDBFolder.h"
 #include "nsComponentManagerUtils.h"
--- a/mailnews/local/src/nsPop3Sink.h
+++ b/mailnews/local/src/nsPop3Sink.h
@@ -8,17 +8,16 @@
 #include "nscore.h"
 #include "nsIPop3Sink.h"
 #include "nsIOutputStream.h"
 #include "prmem.h"
 #include "prio.h"
 #include "plstr.h"
 #include "prenv.h"
 #include "nsIMsgFolder.h"
-#include "nsAutoPtr.h"
 #include "nsTArray.h"
 #include "nsString.h"
 
 class nsParseNewMailState;
 class nsIMsgFolder;
 
 struct partialRecord {
   partialRecord();
--- a/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
@@ -20,17 +20,16 @@
 #include "prprf.h"
 #include "nsStringEnumerator.h"
 #include "nsServiceManagerUtils.h"
 // hack: include this to fix opening news attachments.
 #include "nsINntpUrl.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMsgMimeCID.h"
 #include "nsMsgUtils.h"
-#include "nsAutoPtr.h"
 #include "nsMemory.h"
 #include "mozilla/Services.h"
 
 #define VIEW_ALL_HEADERS 2
 
 /**
  * A helper class to implement nsIUTF8StringEnumerator
  */
--- a/mailnews/mime/src/MimeHeaderParser.cpp
+++ b/mailnews/mime/src/MimeHeaderParser.cpp
@@ -3,17 +3,16 @@
 /* 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 "mozilla/mailnews/MimeHeaderParser.h"
 #include "mozilla/mailnews/Services.h"
 #include "mozilla/DebugOnly.h"
 #include "nsMemory.h"
-#include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsIMsgHeaderParser.h"
 
 namespace mozilla {
 namespace mailnews {
 
 void detail::DoConversion(const nsTArray<nsString> &aUTF16Array,
                           nsTArray<nsCString> &aUTF8Array) {
--- a/mailnews/mime/src/mimecms.cpp
+++ b/mailnews/mime/src/mimecms.cpp
@@ -13,17 +13,16 @@
 #include "mimemsg.h"
 #include "mimemoz2.h"
 #include "nsIURI.h"
 #include "nsIMsgWindow.h"
 #include "nsIMsgMailNewsUrl.h"
 #include "nsIMimeMiscStatus.h"
 #include "nsIMsgSMIMEHeaderSink.h"
 #include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
 #include "nsIX509Cert.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsProxyRelease.h"
 #include "mozilla/mailnews/MimeHeaderParser.h"
 
 using namespace mozilla::mailnews;
--- a/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
+++ b/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
@@ -7,17 +7,16 @@
 #include "mimeobj.h"
 #include "mimetext.h"
 #include "mimemoz2.h"
 #include "mimecom.h"
 #include "nsString.h"
 #include "nsComponentManagerUtils.h"
 #include "nsICategoryManager.h"
 #include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
 #include "nsISimpleMimeConverter.h"
 #include "nsServiceManagerUtils.h"
 #include "nsSimpleMimeConverterStub.h"
 
 typedef struct MimeSimpleStub MimeSimpleStub;
 typedef struct MimeSimpleStubClass MimeSimpleStubClass;
 
 struct MimeSimpleStubClass {
--- a/mailnews/news/src/nsNNTPArticleList.cpp
+++ b/mailnews/news/src/nsNNTPArticleList.cpp
@@ -3,17 +3,16 @@
  * 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 "nsCOMPtr.h"
 #include "nsNNTPArticleList.h"
 #include "nsIMsgFolder.h"
-#include "nsAutoPtr.h"
 #include "nsMsgKeyArray.h"
 
 NS_IMPL_ISUPPORTS(nsNNTPArticleList, nsINNTPArticleList)
 
 nsNNTPArticleList::nsNNTPArticleList() {}
 
 nsNNTPArticleList::~nsNNTPArticleList() {
   if (m_newsDB) {
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -49,17 +49,16 @@
 #include "nsNativeCharsetUtils.h"
 
 #include "nsIMsgFolderNotificationService.h"
 #include "nsIMutableArray.h"
 #include "nsILoginInfo.h"
 #include "nsILoginManager.h"
 #include "nsEmbedCID.h"
 #include "mozilla/Services.h"
-#include "nsAutoPtr.h"
 #include "nsIInputStream.h"
 #include "nsMemory.h"
 #include "nsIURIMutator.h"
 
 #define kNewsSortOffset 9000
 
 #define NEWS_SCHEME "news:"
 #define SNEWS_SCHEME "snews:"
--- a/mailnews/news/src/nsNntpIncomingServer.h
+++ b/mailnews/news/src/nsNntpIncomingServer.h
@@ -21,17 +21,16 @@
 #include "nsITimer.h"
 #include "nsIFile.h"
 #include "nsITreeView.h"
 #include "nsITreeSelection.h"
 #include "nsCOMArray.h"
 #include "nsTArray.h"
 
 #include "nsNntpMockChannel.h"
-#include "nsAutoPtr.h"
 
 /* get some implementation from nsMsgIncomingServer */
 class nsNntpIncomingServer : public nsMsgIncomingServer,
                              public nsINntpIncomingServer,
                              public nsIUrlListener,
                              public nsISubscribableServer,
                              public nsITreeView