Bug 1512356 - Follow-up: Create NS_MSGMAILNEWSURL_CID and related items. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Sat, 08 Dec 2018 02:56:25 +0100
changeset 33863 e0c27feaf097359da1f9e8796800c2ca7da2d637
parent 33862 39222abf711e71a31052733e66bedc3a96ffbb8f
child 33864 21219ad63ec84a637511fb8b76ddf34a874d51ca
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersbustage-fix
bugs1512356
Bug 1512356 - Follow-up: Create NS_MSGMAILNEWSURL_CID and related items. rs=bustage-fix
mailnews/base/util/nsMsgMailNewsUrl.cpp
mailnews/build/nsMailModule.cpp
mailnews/local/public/nsMsgLocalCID.h
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -135,19 +135,19 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetClass
   return GetClassIDNoAlloc(*aClassID);
 }
 
 NS_IMETHODIMP nsMsgMailNewsUrl::GetFlags(uint32_t *aFlags) {
   *aFlags = nsIClassInfo::MAIN_THREAD_ONLY;
   return NS_OK;
 }
 
-static NS_DEFINE_CID(kNS_MAILBOXURL_CID, NS_MAILBOXURL_CID);
+static NS_DEFINE_CID(kNS_MSGMAILNEWSURL_CID, NS_MSGMAILNEWSURL_CID);
 NS_IMETHODIMP nsMsgMailNewsUrl::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) {
-  *aClassIDNoAlloc = kNS_MAILBOXURL_CID;  // XXX TODO: May need to vary based on type.
+  *aClassIDNoAlloc = kNS_MSGMAILNEWSURL_CID;
   return NS_OK;
 }
 
 // Support for nsIURIWithSpecialOrigin.
 NS_IMETHODIMP nsMsgMailNewsUrl::GetOrigin(nsIURI **aOrigin)
 {
   MOZ_ASSERT(m_hasNormalizedOrigin,
     "nsMsgMailNewsUrl::GetOrigin() can only be called for URLs with normalized spec");
--- a/mailnews/build/nsMailModule.cpp
+++ b/mailnews/build/nsMailModule.cpp
@@ -613,16 +613,17 @@ NS_DEFINE_NAMED_CID(NS_IMAPINCOMINGSERVE
 NS_DEFINE_NAMED_CID(NS_IMAPRESOURCE_CID);
 NS_DEFINE_NAMED_CID(NS_IMAPSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_AUTOSYNCMANAGER_CID);
 
 ////////////////////////////////////////////////////////////////////////////////
 // local factories
 ////////////////////////////////////////////////////////////////////////////////
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailboxUrl)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMailNewsUrl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPop3URL)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMailboxParser)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailboxService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPop3Service)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoneService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgLocalMailFolder)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsParseMailMessageState)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPop3IncomingServer, Init)
@@ -632,16 +633,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsRssServ
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMovemailIncomingServer, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMovemailService)
 #endif /* HAVE_MOVEMAIL */
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNoIncomingServer, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgBrkMBoxStore)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMaildirStore)
 
 NS_DEFINE_NAMED_CID(NS_MAILBOXURL_CID);
+NS_DEFINE_NAMED_CID(NS_MSGMAILNEWSURL_CID);
 NS_DEFINE_NAMED_CID(NS_MAILBOXSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_MAILBOXPARSER_CID);
 NS_DEFINE_NAMED_CID(NS_POP3URL_CID);
 NS_DEFINE_NAMED_CID(NS_POP3SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_NONESERVICE_CID);
 #ifdef HAVE_MOVEMAIL
 NS_DEFINE_NAMED_CID(NS_MOVEMAILSERVICE_CID);
 #endif /* HAVE_MOVEMAIL */
@@ -971,16 +973,17 @@ const mozilla::Module::CIDEntry kMailNew
   { &kNS_IMAPMOCKCHANNEL_CID, false, nullptr, nsImapMockChannelConstructor },
   { &kNS_IIMAPHOSTSESSIONLIST_CID, false, nullptr, nsIMAPHostSessionListConstructor },
   { &kNS_IMAPINCOMINGSERVER_CID, false, nullptr, nsImapIncomingServerConstructor },
   { &kNS_IMAPRESOURCE_CID, false, nullptr, nsImapMailFolderConstructor },
   { &kNS_IMAPSERVICE_CID, false, nullptr, nsImapServiceConstructor },
   { &kNS_AUTOSYNCMANAGER_CID, false, nullptr, nsAutoSyncManagerConstructor },
   // Local Entries
   { &kNS_MAILBOXURL_CID, false, NULL, nsMailboxUrlConstructor },
+  { &kNS_MSGMAILNEWSURL_CID, false, NULL, nsMsgMailNewsUrlConstructor },
   { &kNS_MAILBOXSERVICE_CID, false, NULL, nsMailboxServiceConstructor },
   { &kNS_MAILBOXPARSER_CID, false, NULL, nsMsgMailboxParserConstructor },
   { &kNS_POP3URL_CID, false, NULL, nsPop3URLConstructor },
   { &kNS_POP3SERVICE_CID, false, NULL, nsPop3ServiceConstructor },
   { &kNS_NONESERVICE_CID, false, NULL, nsNoneServiceConstructor },
 #ifdef HAVE_MOVEMAIL
   { &kNS_MOVEMAILSERVICE_CID, false, NULL, nsMovemailServiceConstructor },
 #endif /* HAVE_MOVEMAIL */
@@ -1185,16 +1188,17 @@ const mozilla::Module::ContractIDEntry k
   { "@mozilla.org/messenger/messageservice;1?type=imap", &kNS_IMAPSERVICE_CID },
   { NS_IMAPSERVICE_CONTRACTID, &kNS_IMAPSERVICE_CID },
   { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "imap", &kNS_IMAPSERVICE_CID },
   { NS_IMAPPROTOCOLINFO_CONTRACTID, &kNS_IMAPSERVICE_CID },
   { NS_CONTENT_HANDLER_CONTRACTID_PREFIX"x-application-imapfolder", &kNS_IMAPSERVICE_CID },
   { NS_AUTOSYNCMANAGER_CONTRACTID, &kNS_AUTOSYNCMANAGER_CID },
   // Local Entries
   { NS_MAILBOXURL_CONTRACTID, &kNS_MAILBOXURL_CID },
+  { NS_MSGMAILNEWSURL_CONTRACTID, &kNS_MSGMAILNEWSURL_CID },
   { NS_MAILBOXSERVICE_CONTRACTID1, &kNS_MAILBOXSERVICE_CID },
   { NS_MAILBOXSERVICE_CONTRACTID2, &kNS_MAILBOXSERVICE_CID },
   { NS_MAILBOXSERVICE_CONTRACTID3, &kNS_MAILBOXSERVICE_CID },
   { NS_MAILBOXSERVICE_CONTRACTID4, &kNS_MAILBOXSERVICE_CID },
   { NS_MAILBOXPARSER_CONTRACTID, &kNS_MAILBOXPARSER_CID },
   { NS_POP3URL_CONTRACTID, &kNS_POP3URL_CID },
   { NS_POP3SERVICE_CONTRACTID1, &kNS_POP3SERVICE_CID },
   { NS_POP3SERVICE_CONTRACTID2, &kNS_POP3SERVICE_CID },
--- a/mailnews/local/public/nsMsgLocalCID.h
+++ b/mailnews/local/public/nsMsgLocalCID.h
@@ -86,16 +86,25 @@
 #define NS_MAILBOXURL_CONTRACTID  \
   "@mozilla.org/messenger/mailboxurl;1"
 
 /* 46EFCB10-CB6D-11d2-8065-006008128C4E */
 #define NS_MAILBOXURL_CID                      \
 { 0x46efcb10, 0xcb6d, 0x11d2,                  \
     { 0x80, 0x65, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
 
+//
+// nsMsgMailNewsUrl
+//
+#define NS_MSGMAILNEWSURL_CONTRACTID  \
+  "@mozilla.org/messenger/msgmailnewsurl;1"
+
+#define NS_MSGMAILNEWSURL_CID \
+{ 0x3fdae3ab, 0x4ac1, 0x4ad4, \
+  { 0xb2, 0x8a, 0x28, 0xd0, 0xfa, 0x36, 0x39, 0x29 } }
 
 //
 // nsPop3Url
 //
 #define NS_POP3URL_CONTRACTID \
   "@mozilla.org/messenger/popurl;1"
 
 /* EA1B0A11-E6F4-11d2-8070-006008128C4E */