зеркало из https://github.com/mozilla/gecko-dev.git
code cleanup. replace static cid with contract id.
This commit is contained in:
Родитель
7618325cbd
Коммит
d73584dce2
|
@ -138,10 +138,6 @@ static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
|
||||||
static NS_DEFINE_CID(kMsgCopyServiceCID, NS_MSGCOPYSERVICE_CID);
|
static NS_DEFINE_CID(kMsgCopyServiceCID, NS_MSGCOPYSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kMsgPrintEngineCID, NS_MSG_PRINTENGINE_CID);
|
static NS_DEFINE_CID(kMsgPrintEngineCID, NS_MSG_PRINTENGINE_CID);
|
||||||
|
|
||||||
|
|
||||||
/* This is the next generation string retrieval call */
|
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
|
|
||||||
#if defined(DEBUG_seth_) || defined(DEBUG_sspitzer_) || defined(DEBUG_jefft)
|
#if defined(DEBUG_seth_) || defined(DEBUG_sspitzer_) || defined(DEBUG_jefft)
|
||||||
#define DEBUG_MESSENGER
|
#define DEBUG_MESSENGER
|
||||||
#endif
|
#endif
|
||||||
|
@ -1893,7 +1889,7 @@ nsMessenger::InitStringBundle()
|
||||||
const char propertyURL[] = MESSENGER_STRING_URL;
|
const char propertyURL[] = MESSENGER_STRING_URL;
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundleService> sBundleService =
|
nsCOMPtr<nsIStringBundleService> sBundleService =
|
||||||
do_GetService(kStringBundleServiceCID, &res);
|
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
|
||||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||||
{
|
{
|
||||||
res = sBundleService->CreateBundle(propertyURL,
|
res = sBundleService->CreateBundle(propertyURL,
|
||||||
|
|
|
@ -99,7 +99,6 @@ static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
|
||||||
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
|
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kAB4xUpgraderServiceCID, NS_AB4xUPGRADER_CID);
|
static NS_DEFINE_CID(kAB4xUpgraderServiceCID, NS_AB4xUPGRADER_CID);
|
||||||
static NS_DEFINE_CID(kAddressBookCID, NS_ADDRESSBOOK_CID);
|
static NS_DEFINE_CID(kAddressBookCID, NS_ADDRESSBOOK_CID);
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
|
|
||||||
#define IMAP_SCHEMA "imap:/"
|
#define IMAP_SCHEMA "imap:/"
|
||||||
#define IMAP_SCHEMA_LENGTH 6
|
#define IMAP_SCHEMA_LENGTH 6
|
||||||
|
@ -447,7 +446,7 @@ nsMessengerMigrator::initializeStrings()
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||||
do_GetService(kStringBundleServiceCID, &rv);
|
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundle> bundle;
|
nsCOMPtr<nsIStringBundle> bundle;
|
||||||
|
|
|
@ -64,8 +64,6 @@
|
||||||
#include "nsIMsgCopyService.h"
|
#include "nsIMsgCopyService.h"
|
||||||
#include "nsMsgBaseCID.h"
|
#include "nsMsgBaseCID.h"
|
||||||
|
|
||||||
/* Implementation file */
|
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||||
|
|
||||||
nsrefcnt nsMsgDBView::gInstanceCount = 0;
|
nsrefcnt nsMsgDBView::gInstanceCount = 0;
|
||||||
|
@ -372,7 +370,7 @@ PRUnichar * nsMsgDBView::GetString(const PRUnichar *aStringName)
|
||||||
if (!mMessengerStringBundle)
|
if (!mMessengerStringBundle)
|
||||||
{
|
{
|
||||||
static const char propertyURL[] = MESSENGER_STRING_URL;
|
static const char propertyURL[] = MESSENGER_STRING_URL;
|
||||||
nsCOMPtr<nsIStringBundleService> sBundleService = do_GetService(kStringBundleServiceCID, &res);
|
nsCOMPtr<nsIStringBundleService> sBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
|
||||||
if (NS_SUCCEEDED(res) && sBundleService)
|
if (NS_SUCCEEDED(res) && sBundleService)
|
||||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle));
|
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle));
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
|
|
||||||
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
|
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
|
||||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// nsFolderCompactState
|
// nsFolderCompactState
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
static NS_DEFINE_CID(kCImapService, NS_IMAPSERVICE_CID);
|
static NS_DEFINE_CID(kCImapService, NS_IMAPSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
|
static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
|
||||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
|
|
||||||
NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgOfflineManager,
|
NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgOfflineManager,
|
||||||
nsIMsgOfflineManager,
|
nsIMsgOfflineManager,
|
||||||
|
@ -281,7 +280,7 @@ nsresult nsMsgOfflineManager::ShowStatus(const char *statusMsgName)
|
||||||
static const char propertyURL[] = MESSENGER_STRING_URL;
|
static const char propertyURL[] = MESSENGER_STRING_URL;
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundleService> sBundleService =
|
nsCOMPtr<nsIStringBundleService> sBundleService =
|
||||||
do_GetService(kStringBundleServiceCID, &res);
|
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
|
||||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||||
{
|
{
|
||||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||||
|
|
|
@ -59,8 +59,6 @@
|
||||||
// nsMsgPrintEngine implementation
|
// nsMsgPrintEngine implementation
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
|
||||||
|
|
||||||
nsMsgPrintEngine::nsMsgPrintEngine()
|
nsMsgPrintEngine::nsMsgPrintEngine()
|
||||||
{
|
{
|
||||||
mCurrentlyPrintingURI = -1;
|
mCurrentlyPrintingURI = -1;
|
||||||
|
@ -520,7 +518,7 @@ nsMsgPrintEngine::GetString(const PRUnichar *aStringName)
|
||||||
static const char propertyURL[] = MESSENGER_STRING_URL;
|
static const char propertyURL[] = MESSENGER_STRING_URL;
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundleService> sBundleService =
|
nsCOMPtr<nsIStringBundleService> sBundleService =
|
||||||
do_GetService(kStringBundleServiceCID, &res);
|
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
|
||||||
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
|
||||||
{
|
{
|
||||||
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче