зеркало из https://github.com/mozilla/pjs.git
Bug 337917 Make consumers stop using cids from other modules
r=bienvenu sr=neil
This commit is contained in:
Родитель
f24522c8fd
Коммит
c139a43d25
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче