Bug 337917 Make consumers stop using cids from other modules

r=bienvenu sr=neil
This commit is contained in:
timeless%mozdev.org 2006-06-03 23:40:27 +00:00
Родитель f24522c8fd
Коммит c139a43d25
9 изменённых файлов: 11 добавлений и 19 удалений

Просмотреть файл

@ -1736,8 +1736,7 @@ nsSimpleGlobalHistory::OpenDB()
rv = NS_GetSpecialDirectory(NS_APP_HISTORY_50_FILE, getter_AddRefs(historyFile));
NS_ENSURE_SUCCESS(rv, rv);
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
nsCOMPtr<nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(kMorkCID, &rv);
nsCOMPtr<nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(NS_MORK_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = factoryfactory->GetMdbFactory(&gMdbFactory);

Просмотреть файл

@ -42,6 +42,9 @@
#include "nsIFactory.h"
#include "nsIComponentManager.h"
#define NS_MORK_CONTRACTID \
"@mozilla.org/db/mork;1"
// 36d90300-27f5-11d3-8d74-00805f8a6617
#define NS_MORK_CID \
{ 0x36d90300, 0x27f5, 0x11d3, \

Просмотреть файл

@ -61,7 +61,7 @@ static const nsModuleComponentInfo components[] =
{
{ "Mork Factory",
NS_MORK_CID,
nsnull,
NS_MORK_CONTRACTID,
nsMorkFactoryFactoryConstructor
}
};

Просмотреть файл

@ -101,8 +101,6 @@ struct mdbOid gAddressBookTableOID;
static const char kMailListAddressFormat[] = "Address%d";
static NS_DEFINE_CID(kCMorkFactory, NS_MORK_CID);
nsAddrDatabase::nsAddrDatabase()
: m_mdbEnv(nsnull), m_mdbStore(nsnull),
m_mdbPabTable(nsnull),
@ -444,7 +442,7 @@ nsIMdbFactory *nsAddrDatabase::GetMDBFactory()
if (!gMDBFactory)
{
nsresult rv;
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(kCMorkFactory, &rv);
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(NS_MORK_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && factoryfactory)
rv = factoryfactory->GetMdbFactory(&gMDBFactory);

Просмотреть файл

@ -48,12 +48,9 @@
#include "nsXPIDLString.h"
#include "nsMsgBaseCID.h"
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
const char *kFoldersScope = "ns:msg:db:row:scope:folders:all"; // scope for all folders table
const char *kFoldersTableKind = "ns:msg:db:table:kind:folders";
nsMsgFolderCache::nsMsgFolderCache()
{
m_cacheElements = nsnull;
@ -111,7 +108,7 @@ nsMsgFolderCache::QueryInterface(const nsIID& iid, void **result)
if (!gMDBFactory)
{
nsresult rv;
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(kMorkCID, &rv);
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(NS_MORK_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && factoryfactory)
rv = factoryfactory->GetMdbFactory(&gMDBFactory);
}

Просмотреть файл

@ -76,8 +76,6 @@
#include "MailNewsTypes2.h"
#include "nsMsgUtils.h"
static NS_DEFINE_CID(kCMorkFactory, NS_MORK_CID);
#if defined(XP_MAC) && defined(CompareString)
#undef CompareString
#endif
@ -993,7 +991,7 @@ NS_IMETHODIMP nsMsgDatabase::QueryInterface(REFNSIID aIID, void** aResult)
static nsIMdbFactory *gMDBFactory = nsnull;
if (!gMDBFactory)
{
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(kCMorkFactory);
nsCOMPtr <nsIMdbFactoryFactory> factoryfactory = do_CreateInstance(NS_MORK_CONTRACTID);
if (factoryfactory)
factoryfactory->GetMdbFactory(&gMDBFactory);
}

Просмотреть файл

@ -2672,9 +2672,8 @@ nsGlobalHistory::OpenDB()
rv = NS_GetSpecialDirectory(NS_APP_HISTORY_50_FILE, getter_AddRefs(historyFile));
NS_ENSURE_SUCCESS(rv, rv);
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
nsCOMPtr<nsIMdbFactoryFactory> factoryfactory =
do_CreateInstance(kMorkCID, &rv);
do_CreateInstance(NS_MORK_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = factoryfactory->GetMdbFactory(&gMdbFactory);

Просмотреть файл

@ -350,8 +350,7 @@ nsFormHistory::OpenDatabase()
historyFile->Append(NS_ConvertUTF8toUTF16(kFormHistoryFileName));
// Get an Mdb Factory
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
nsCOMPtr<nsIMdbFactoryFactory> mdbFactory = do_CreateInstance(kMorkCID, &rv);
nsCOMPtr<nsIMdbFactoryFactory> mdbFactory = do_CreateInstance(NS_MORK_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = mdbFactory->GetMdbFactory(getter_AddRefs(mMdbFactory));
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -2573,9 +2573,8 @@ nsGlobalHistory::OpenDB()
rv = NS_GetSpecialDirectory(NS_APP_HISTORY_50_FILE, getter_AddRefs(historyFile));
NS_ENSURE_SUCCESS(rv, rv);
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
nsCOMPtr<nsIMdbFactoryFactory> factoryfactory =
do_CreateInstance(kMorkCID, &rv);
do_CreateInstance(NS_MORK_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = factoryfactory->GetMdbFactory(&gMdbFactory);