Bug 337917 Make consumers stop using cids from other modules

This commit is contained in:
timeless%mozdev.org 2006-06-18 21:18:22 +00:00
parent 41ac189e2b
commit 27eaab5dcd
42 changed files with 68 additions and 150 deletions

View File

@ -186,8 +186,6 @@ static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
static const char kURINC_BookmarksTopRoot[] = "NC:BookmarksTopRoot";
static const char kURINC_BookmarksRoot[] = "NC:BookmarksRoot";
@ -1687,11 +1685,11 @@ nsBookmarksService::Init()
rv = bm_AddRefGlobals();
if (NS_FAILED(rv)) return rv;
mNetService = do_GetService(kIOServiceCID, &rv);
mNetService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
// create cache service/session, ignoring errors
mCacheService = do_GetService(kCacheServiceCID, &rv);
mCacheService = do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
{
rv = mCacheService->CreateSession("HTTP", nsICache::STORE_ANYWHERE,

View File

@ -153,7 +153,6 @@ const PRInt32 kBackward = 1;
#define ID_NOT_IN_DOCUMENT ((nsIContent *)2)
#define NAME_NOT_VALID ((nsBaseContentList*)1)
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
// Returns the name atom of aContent, if the content is a named item
@ -1852,7 +1851,7 @@ nsHTMLDocument::GetCookie(nsAString& aCookie)
// no cookie isn't an error condition.
// not having a cookie service isn't an error
nsCOMPtr<nsICookieService> service = do_GetService(kCookieServiceCID);
nsCOMPtr<nsICookieService> service = do_GetService(NS_COOKIESERVICE_CONTRACTID);
if (service) {
// Get a URI from the document principal. We use the original
// codebase in case the codebase was changed by SetDomain
@ -1878,7 +1877,7 @@ NS_IMETHODIMP
nsHTMLDocument::SetCookie(const nsAString& aCookie)
{
// not having a cookie service isn't an error
nsCOMPtr<nsICookieService> service = do_GetService(kCookieServiceCID);
nsCOMPtr<nsICookieService> service = do_GetService(NS_COOKIESERVICE_CONTRACTID);
if (service && mDocumentURI) {
nsCOMPtr<nsIPrompt> prompt;
nsCOMPtr<nsPIDOMWindow> window = GetWindow();

View File

@ -43,8 +43,6 @@
#include "nsIComponentManager.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////////////
nsWyciwygProtocolHandler::nsWyciwygProtocolHandler()
@ -94,7 +92,7 @@ nsWyciwygProtocolHandler::NewURI(const nsACString &aSpec,
{
nsresult rv;
nsCOMPtr<nsIURI> url = do_CreateInstance(kSimpleURICID, &rv);
nsCOMPtr<nsIURI> url = do_CreateInstance(NS_SIMPLEURI_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = url->SetSpec(aSpec);

View File

@ -176,7 +176,6 @@
#include "nsPluginError.h"
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
@ -855,7 +854,7 @@ nsDocShell::LoadStream(nsIInputStream *aStream, nsIURI * aURI,
if (!uri) {
// HACK ALERT
nsresult rv = NS_OK;
uri = do_CreateInstance(kSimpleURICID, &rv);
uri = do_CreateInstance(NS_SIMPLEURI_CONTRACTID, &rv);
if (NS_FAILED(rv))
return rv;
// Make sure that the URI spec "looks" like a protocol and path...

View File

@ -292,7 +292,6 @@ PRInt32 gTimeoutCnt = 0;
#ifdef OJI
static NS_DEFINE_CID(kJVMServiceCID, NS_JVMMANAGER_CID);
#endif
static NS_DEFINE_CID(kHTTPHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
static NS_DEFINE_CID(kCharsetConverterManagerCID,
NS_ICHARSETCONVERTERMANAGER_CID);
@ -7552,7 +7551,7 @@ nsNavigator::GetUserAgent(nsAString& aUserAgent)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString ua;
rv = service->GetUserAgent(ua);
@ -7567,7 +7566,7 @@ nsNavigator::GetAppCodeName(nsAString& aAppCodeName)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString appName;
rv = service->GetAppName(appName);
@ -7592,7 +7591,7 @@ nsNavigator::GetAppVersion(nsAString& aAppVersion)
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString str;
rv = service->GetAppVersion(str);
@ -7643,7 +7642,7 @@ nsNavigator::GetLanguage(nsAString& aLanguage)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString lang;
rv = service->GetLanguage(lang);
@ -7668,7 +7667,7 @@ nsNavigator::GetPlatform(nsAString& aPlatform)
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
// sorry for the #if platform ugliness, but Communicator is
// likewise hardcoded and we're seeking backward compatibility
@ -7699,7 +7698,7 @@ nsNavigator::GetOscpu(nsAString& aOSCPU)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString oscpu;
rv = service->GetOscpu(oscpu);
@ -7714,7 +7713,7 @@ nsNavigator::GetVendor(nsAString& aVendor)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString vendor;
rv = service->GetVendor(vendor);
@ -7730,7 +7729,7 @@ nsNavigator::GetVendorSub(nsAString& aVendorSub)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString vendor;
rv = service->GetVendorSub(vendor);
@ -7745,7 +7744,7 @@ nsNavigator::GetProduct(nsAString& aProduct)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString product;
rv = service->GetProduct(product);
@ -7760,7 +7759,7 @@ nsNavigator::GetProductSub(nsAString& aProductSub)
{
nsresult rv;
nsCOMPtr<nsIHttpProtocolHandler>
service(do_GetService(kHTTPHandlerCID, &rv));
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
if (NS_SUCCEEDED(rv)) {
nsCAutoString productSub;
rv = service->GetProductSub(productSub);

View File

@ -70,7 +70,6 @@
#include "nsIDocShell.h"
#include "nsIContentViewer.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
class nsJSThunk : public nsIInputStream
{
@ -811,7 +810,7 @@ nsJSProtocolHandler::NewURI(const nsACString &aSpec,
// CreateInstance.
nsIURI* url;
rv = CallCreateInstance(kSimpleURICID, &url);
rv = CallCreateInstance(NS_SIMPLEURI_CONTRACTID, &url);
if (NS_FAILED(rv))
return rv;

View File

@ -181,8 +181,6 @@ GeckoProtocolChannel::~GeckoProtocolChannel()
// nsMemory::Free(mData);
}
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
NS_METHOD GeckoProtocolHandlerImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
GeckoProtocolHandlerImpl *impl = new GeckoProtocolHandlerImpl();
@ -229,7 +227,7 @@ NS_IMETHODIMP GeckoProtocolHandlerImpl::NewURI(const nsACString & aSpec, const c
{
nsresult rv;
nsIURI* url;
rv = CallCreateInstance(kSimpleURICID, &url);
rv = CallCreateInstance(NS_SIMPLEURI_CONTRACTID, &url);
if (NS_FAILED(rv))
return rv;
rv = url->SetSpec(aSpec);

View File

@ -55,9 +55,6 @@
#include "nsNetUtil.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
// nsDateTimeChannel methods
nsDateTimeChannel::nsDateTimeChannel()
: mLoadFlags(LOAD_NORMAL)
@ -199,7 +196,7 @@ nsDateTimeChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
// create transport
//
nsCOMPtr<nsISocketTransportService> sts =
do_GetService(kSocketTransportServiceCID, &rv);
do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = sts->CreateTransport(nsnull, 0, mHost, mPort, mProxyInfo,
@ -213,7 +210,7 @@ nsDateTimeChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
// create TXT to HTML stream converter
//
nsCOMPtr<nsIStreamConverterService> scs =
do_GetService(kStreamConverterServiceCID, &rv);
do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIStreamListener> convListener;

View File

@ -47,8 +47,6 @@
#include "nsIProgressEventSink.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////////////
nsDateTimeHandler::nsDateTimeHandler() {
@ -102,7 +100,7 @@ nsDateTimeHandler::NewURI(const nsACString &aSpec,
nsresult rv;
nsIURI* url;
rv = CallCreateInstance(kSimpleURICID, &url);
rv = CallCreateInstance(NS_SIMPLEURI_CONTRACTID, &url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec(aSpec);

View File

@ -56,9 +56,6 @@
#include "nsNetUtil.h"
#include "nsCRT.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
#define BUFFER_SEG_SIZE (4*1024)
#define BUFFER_MAX_SIZE (64*1024)
@ -218,7 +215,7 @@ nsFingerChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
// create transport
//
nsCOMPtr<nsISocketTransportService> sts =
do_GetService(kSocketTransportServiceCID, &rv);
do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = sts->CreateTransport(nsnull, 0, mHost, mPort, mProxyInfo,
@ -235,7 +232,7 @@ nsFingerChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
// create TXT to HTML stream converter
//
nsCOMPtr<nsIStreamConverterService> scs =
do_GetService(kStreamConverterServiceCID, &rv);
do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIStreamListener> convListener;

View File

@ -49,8 +49,6 @@
#include "nsIProgressEventSink.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////////////
nsFingerHandler::nsFingerHandler() {
@ -104,7 +102,7 @@ nsFingerHandler::NewURI(const nsACString &aSpec,
nsresult rv;
nsIURI* url;
rv = CallCreateInstance(kSimpleURICID, &url);
rv = CallCreateInstance(NS_SIMPLEURI_CONTRACTID, &url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec(aSpec);

View File

@ -48,9 +48,6 @@
#include "nsIChannel.h"
#include "nsThreadUtils.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
//**********************************************************************
// Javascript Environment
@ -735,7 +732,7 @@ nsJSSh::NewResolve(nsIXPConnectWrappedNative *wrapper,
PRBool nsJSSh::LoadURL(const char *url, jsval* retval)
{
nsCOMPtr<nsIIOService> ioserv = do_GetService(kIOServiceCID);
nsCOMPtr<nsIIOService> ioserv = do_GetService(NS_IOSERVICE_CONTRACTID);
if (!ioserv) {
NS_ERROR("could not get io service");
return PR_FALSE;

View File

@ -45,8 +45,6 @@
#include "nsThreadUtils.h"
#include "nsJSSh.h"
static NS_DEFINE_CID(kServerSocketCID, NS_SERVERSOCKET_CID);
//**********************************************************************
// ConnectionListener helper class
@ -168,7 +166,7 @@ nsJSShServer::StartServerSocket(PRUint32 port, const nsACString & startupURI,
return NS_ERROR_FAILURE;
}
mServerSocket = do_CreateInstance(kServerSocketCID);
mServerSocket = do_CreateInstance(NS_SERVERSOCKET_CONTRACTID);
if (!mServerSocket) {
NS_ERROR("could not create server socket");
return NS_ERROR_FAILURE;

View File

@ -49,9 +49,6 @@
#include "nsIWindowWatcher.h"
#include "plstr.h"
// IID and CIDs of all the services needed
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#define kRegTreeStream (NS_LITERAL_STRING("Stream"))
#define kRegKeyURL (NS_LITERAL_STRING("BaseURL"))
#define kRegKeyUsername (NS_LITERAL_STRING("Username"))
@ -111,7 +108,7 @@ nsresult Stream::Init(Core* aController)
/* failure is non-fatal, because username might be in the URL, and
even if it isn't, the transfer will pull up a prompt. */
{
nsCOMPtr<nsIIOService> ioserv = do_GetService(kIOServiceCID, &rv);
nsCOMPtr<nsIIOService> ioserv = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIURI> uri;
@ -153,7 +150,7 @@ nsresult Stream::Init(Core* aController)
rv = mController->GetProfileDir(getter_AddRefs(profiledir));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIIOService> ioserv = do_GetService(kIOServiceCID, &rv);
nsCOMPtr<nsIIOService> ioserv = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = NS_NewFileURI(getter_AddRefs(mProfileDir), profiledir);

View File

@ -66,8 +66,6 @@
#include "mozXMLTermUtils.h"
#include "mozXMLTermStream.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
/////////////////////////////////////////////////////////////////////////
// mozXMLTermStream implementation
/////////////////////////////////////////////////////////////////////////
@ -205,7 +203,7 @@ NS_IMETHODIMP mozXMLTermStream::Open(nsIDOMWindowInternal* aDOMWindow,
nsCOMPtr<nsIInputStream> inputStream = this;
// Create a simple URI
nsCOMPtr<nsIURI> uri = do_CreateInstance(kSimpleURICID, &result);
nsCOMPtr<nsIURI> uri = do_CreateInstance(NS_SIMPLEURI_CONTRACTID, &result);
if (NS_FAILED(result))
return result;

View File

@ -55,8 +55,6 @@
#include "jsapi.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
/* load() error msgs, XXX localize? */
#define LOAD_ERROR_NOSERVICE "Error creating IO Service."
#define LOAD_ERROR_NOCHANNEL "Error creating channel (invalid URL scheme?)"
@ -218,7 +216,7 @@ mozJSSubScriptLoader::LoadSubScript (const PRUnichar * /*url*/
nsCOMPtr<nsIChannel> chan;
nsCOMPtr<nsIInputStream> instream;
nsCOMPtr<nsIIOService> serv = do_GetService(kIOServiceCID);
nsCOMPtr<nsIIOService> serv = do_GetService(NS_IOSERVICE_CONTRACTID);
if (!serv)
{
errmsg = JS_NewStringCopyZ (cx, LOAD_ERROR_NOSERVICE);

View File

@ -1827,8 +1827,7 @@ nsImageFrame::LoadIcon(const nsAString& aSpec,
NS_PRECONDITION(!aSpec.IsEmpty(), "What happened??");
if (!sIOService) {
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
rv = CallGetService(kIOServiceCID, &sIOService);
rv = CallGetService(NS_IOSERVICE_CONTRACTID, &sIOService);
NS_ENSURE_SUCCESS(rv, rv);
}

View File

@ -56,7 +56,6 @@
#include "nsXPIDLString.h"
static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgOfflineManager,
nsIMsgOfflineManager,
@ -357,7 +356,7 @@ NS_IMETHODIMP nsMsgOfflineManager::SynchronizeForOffline(PRBool downloadNews, PR
nsresult nsMsgOfflineManager::SetOnlineState(PRBool online)
{
nsresult rv;
nsCOMPtr<nsIIOService> netService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> netService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv) && netService)
{
rv = netService->SetOffline(!online);

View File

@ -57,8 +57,6 @@
#include "nsIFileSpec.h"
#include <time.h>
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
nsMsgMailNewsUrl::nsMsgMailNewsUrl()
{
// nsIURI specific state
@ -575,7 +573,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::Clone(nsIURI **_retval)
{
nsresult rv;
nsCAutoString urlSpec;
nsCOMPtr<nsIIOService> ioService = do_GetService(kIOServiceCID, &rv);
nsCOMPtr<nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = GetSpec(urlSpec);
if (NS_FAILED(rv)) return rv;

View File

@ -63,9 +63,6 @@
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);
NS_IMPL_THREADSAFE_ADDREF(nsMsgProtocol)
NS_IMPL_THREADSAFE_RELEASE(nsMsgProtocol)
@ -126,7 +123,7 @@ nsMsgProtocol::OpenNetworkSocketWithInfo(const char * aHostName,
NS_ENSURE_ARG(aHostName);
nsresult rv = NS_OK;
nsCOMPtr<nsISocketTransportService> socketService (do_GetService(kSocketTransportServiceCID));
nsCOMPtr<nsISocketTransportService> socketService (do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID));
NS_ENSURE_TRUE(socketService, NS_ERROR_FAILURE);
// with socket connections we want to read as much data as arrives
@ -264,7 +261,7 @@ nsresult nsMsgProtocol::OpenFileSocket(nsIURI * aURL, PRUint32 aStartPosition, P
// create input stream transport
nsCOMPtr<nsIStreamTransportService> sts =
do_GetService(kStreamTransportServiceCID, &rv);
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = sts->CreateInputTransport(stream, nsInt64(aStartPosition),

View File

@ -69,9 +69,6 @@
#include "nsXULAppAPI.h"
#endif
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kHTTPHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
NS_IMPL_ISUPPORTS1(nsMsgCompUtils, nsIMsgCompUtils)
nsMsgCompUtils::nsMsgCompUtils()
@ -472,7 +469,7 @@ RRT_HEADER:
}
nsCOMPtr<nsIHttpProtocolHandler> pHTTPHandler = do_GetService(kHTTPHandlerCID, &rv);
nsCOMPtr<nsIHttpProtocolHandler> pHTTPHandler = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv);
if (NS_SUCCEEDED(rv) && pHTTPHandler)
{
nsCAutoString userAgentString;
@ -1753,7 +1750,7 @@ nsMsgNewURL(nsIURI** aInstancePtrResult, const char * aSpec)
nsresult rv = NS_OK;
if (nsnull == aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIIOService> pNetService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> pNetService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv) && pNetService)
{
if (PL_strstr(aSpec, "://") == nsnull && strncmp(aSpec, "data:", 5))

View File

@ -48,15 +48,13 @@
#include "nsMsgMimeCID.h"
#include "nsISupportsObsolete.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
/////////////////////////////////////////////////////////////////////////////////////
// mailto url definition
/////////////////////////////////////////////////////////////////////////////////////
nsMailtoUrl::nsMailtoUrl()
{
mFormat = nsIMsgCompFormat::Default;
m_baseURL = do_CreateInstance(kSimpleURICID);
m_baseURL = do_CreateInstance(NS_SIMPLEURI_CONTRACTID);
}
nsMailtoUrl::~nsMailtoUrl()

View File

@ -111,8 +111,6 @@ PRLogModuleInfo *IMAP;
#define ONE_SECOND ((PRUint32)1000) // one second
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamListenerTeeCID, NS_STREAMLISTENERTEE_CID);
#define OUTPUT_BUFFER_SIZE (4096*2) // mscott - i should be able to remove this if I can use nsMsgLineBuffer???
@ -761,7 +759,7 @@ nsresult nsImapProtocol::SetupWithUrl(nsIURI * aURL, nsISupports* aConsumer)
nsXPIDLCString hostName;
nsCOMPtr<nsISocketTransportService> socketService =
do_GetService(kSocketTransportServiceCID, &rv);
do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && aURL)
{
aURL->GetPort(&port);
@ -8164,7 +8162,7 @@ nsImapMockChannel::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry, nsCache
{
// use a stream listener Tee to force data into the cache and to our current channel listener...
nsCOMPtr<nsIStreamListener> newListener;
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(kStreamListenerTeeCID, &rv);
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(NS_STREAMLISTENERTEE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIOutputStream> out;

View File

@ -73,8 +73,6 @@
static NS_DEFINE_CID( kMsgSendCID, NS_MSGSEND_CID);
static NS_DEFINE_CID( kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
static NS_DEFINE_CID( kIOServiceCID, NS_IOSERVICE_CID);
// We need to do some calculations to set these numbers to something reasonable!
// Unless of course, CreateAndSendMessage will NEVER EVER leave us in the lurch
@ -257,7 +255,7 @@ nsresult nsEudoraCompose::CreateComponents( void)
if (!m_pIOService) {
IMPORT_LOG0( "Creating nsIOService\n");
NS_WITH_PROXIED_SERVICE(nsIIOService, service, kIOServiceCID, NS_PROXY_TO_MAIN_THREAD, &rv);
NS_WITH_PROXIED_SERVICE(nsIIOService, service, NS_IOSERVICE_CONTRACTID, NS_PROXY_TO_MAIN_THREAD, &rv);
if (NS_FAILED(rv))
return( rv);
m_pIOService = service;

View File

@ -74,8 +74,6 @@
static NS_DEFINE_CID( kMsgSendCID, NS_MSGSEND_CID);
static NS_DEFINE_CID( kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
static NS_DEFINE_CID( kIOServiceCID, NS_IOSERVICE_CID);
// We need to do some calculations to set these numbers to something reasonable!
// Unless of course, CreateAndSendMessage will NEVER EVER leave us in the lurch
@ -251,7 +249,7 @@ nsresult nsOutlookCompose::CreateComponents( void)
if (!m_pIOService) {
IMPORT_LOG0( "Creating nsIOService\n");
NS_WITH_PROXIED_SERVICE(nsIIOService, service, kIOServiceCID, NS_PROXY_TO_MAIN_THREAD, &rv);
NS_WITH_PROXIED_SERVICE(nsIIOService, service, NS_IOSERVICE_CONTRACTID, NS_PROXY_TO_MAIN_THREAD, &rv);
if (NS_FAILED(rv))
return( rv);
m_pIOService = service;

View File

@ -128,9 +128,8 @@ nsresult nsMailboxProtocol::OpenMultipleMsgTransport(PRUint32 offset, PRInt32 si
{
nsresult rv;
NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);
nsCOMPtr<nsIStreamTransportService> serv =
do_GetService(kStreamTransportServiceCID, &rv);
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// XXX 64-bit

View File

@ -89,7 +89,6 @@
#include "nsICryptoHash.h"
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
/* the following macros actually implement addref, release and query interface for our component. */
@ -118,7 +117,7 @@ NS_IMETHODIMP nsMsgMailboxParser::OnStartRequest(nsIRequest *request, nsISupport
// we have an error.
nsresult rv = NS_OK;
nsCOMPtr<nsIIOService> ioServ(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioServ(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
nsCOMPtr<nsIMailboxUrl> runningUrl = do_QueryInterface(ctxt, &rv);

View File

@ -100,8 +100,6 @@
#include "mozISanitizingSerializer.h"
// </for>
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
// <for functions="HTML2Plaintext,HTMLSantinize">
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
// </for>
@ -671,7 +669,7 @@ nsMimeNewURI(nsIURI** aInstancePtrResult, const char *aSpec, nsIURI *aBase)
if (nsnull == aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIIOService> pService(do_GetService(kIOServiceCID, &res));
nsCOMPtr<nsIIOService> pService(do_GetService(NS_IOSERVICE_CONTRACTID, &res));
if (NS_FAILED(res))
return NS_ERROR_FACTORY_NOT_REGISTERED;

View File

@ -137,8 +137,6 @@
// and "pushed" authentication (if necessary),
//#define HAVE_NNTP_EXTENSIONS
static NS_DEFINE_CID(kStreamListenerTeeCID, NS_STREAMLISTENERTEE_CID);
typedef struct _cancelInfoEntry {
char *from;
char *old_from;
@ -889,7 +887,7 @@ nsNNTPProtocol::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry, nsCacheAcc
{
// use a stream listener Tee to force data into the cache and to our current channel listener...
nsCOMPtr<nsIStreamListener> newListener;
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(kStreamListenerTeeCID, &rv);
nsCOMPtr<nsIStreamListenerTee> tee = do_CreateInstance(NS_STREAMLISTENERTEE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIOutputStream> out;

View File

@ -99,8 +99,6 @@
#define PREF_MAIL_ROOT_NNTP_REL "mail.root.nntp-rel"
static NS_DEFINE_CID(kMessengerMigratorCID, NS_MESSENGERMIGRATOR_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
nsNntpService::nsNntpService()
{
@ -1245,7 +1243,7 @@ PRBool nsNntpService::WeAreOffline()
nsresult rv = NS_OK;
PRBool offline = PR_FALSE;
nsCOMPtr<nsIIOService> netService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> netService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv) && netService)
netService->GetOffline(&offline);
@ -1840,7 +1838,7 @@ NS_IMETHODIMP nsNntpService::GetCacheSession(nsICacheSession **result)
nsresult rv = NS_OK;
if (!mCacheSession)
{
nsCOMPtr<nsICacheService> serv = do_GetService(kCacheServiceCID, &rv);
nsCOMPtr<nsICacheService> serv = do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = serv->CreateSession("NNTP-memory-only", nsICache::STORE_IN_MEMORY, nsICache::STREAM_BASED, getter_AddRefs(mCacheSession));

View File

@ -47,7 +47,6 @@
#include "plstr.h"
#include <stdlib.h>
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#define DEFAULT_IMAGE_SIZE 16
// helper function for parsing out attributes like size, and contentType
@ -214,7 +213,7 @@ NS_IMETHODIMP
nsMozIconURI::SetSpec(const nsACString &aSpec)
{
nsresult rv;
nsCOMPtr<nsIIOService> ioService (do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService (do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString scheme;

View File

@ -54,8 +54,6 @@
#define NS_COMPILER_GNUC3 defined(__GXX_ABI_VERSION) && \
(__GXX_ABI_VERSION >= 102) /* G++ V3 ABI */
static NS_DEFINE_CID(kHttpHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
// Implementation of nsJVMConfigManagerUnix
NS_IMPL_ISUPPORTS1(nsJVMConfigManagerUnix, nsIJVMConfigManager)
@ -394,7 +392,7 @@ nsJVMConfigManagerUnix::GetAgentVersion(nsCAutoString& _retval)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(kHttpHandlerCID, &rv);
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString userAgent;

View File

@ -211,12 +211,7 @@ static NS_DEFINE_IID(kIPluginInstancePeerIID, NS_IPLUGININSTANCEPEER_IID);
static NS_DEFINE_IID(kIPluginStreamInfoIID, NS_IPLUGINSTREAMINFO_IID);
static NS_DEFINE_CID(kPluginCID, NS_PLUGIN_CID);
static NS_DEFINE_IID(kIPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID);
static NS_DEFINE_CID(kProtocolProxyServiceCID, NS_PROTOCOLPROXYSERVICE_CID);
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kHttpHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
static const char kDirectoryServiceContractID[] = "@mozilla.org/file/directory_service;1";
// for the dialog
static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
@ -2729,7 +2724,7 @@ nsresult nsPluginHostImpl::UserAgent(const char **retstring)
static char resultString[NS_RETURN_UASTRING_SIZE];
nsresult res;
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(kHttpHandlerCID, &res);
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &res);
if (NS_FAILED(res))
return res;
@ -3020,12 +3015,12 @@ NS_IMETHODIMP nsPluginHostImpl::FindProxyForURL(const char* url, char* *result)
nsCOMPtr<nsIProtocolProxyService> proxyService;
nsCOMPtr<nsIIOService> ioService;
proxyService = do_GetService(kProtocolProxyServiceCID, &res);
proxyService = do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &res);
if (NS_FAILED(res) || !proxyService) {
return res;
}
ioService = do_GetService(kIOServiceCID, &res);
ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &res);
if (NS_FAILED(res) || !ioService) {
return res;
}
@ -6080,14 +6075,14 @@ NS_IMETHODIMP nsPluginHostImpl::GetCookie(const char* inCookieURL, void* inOutCo
return NS_ERROR_INVALID_ARG;
}
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv) || (nsnull == ioService)) {
return rv;
}
nsCOMPtr<nsICookieService> cookieService =
do_GetService(kCookieServiceCID, &rv);
do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv) || (nsnull == cookieService)) {
return NS_ERROR_INVALID_ARG;
@ -6125,14 +6120,14 @@ NS_IMETHODIMP nsPluginHostImpl::SetCookie(const char* inCookieURL, const void* i
return NS_ERROR_INVALID_ARG;
}
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv) || (nsnull == ioService)) {
return rv;
}
nsCOMPtr<nsICookieService> cookieService =
do_GetService(kCookieServiceCID, &rv);
do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv) || (nsnull == cookieService)) {
return NS_ERROR_FAILURE;
@ -6763,7 +6758,7 @@ nsPluginByteRangeStreamListener::OnStartRequest(nsIRequest *request, nsISupports
if (!finalStreamListener)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIStreamConverterService> serv = do_GetService(kStreamConverterServiceCID, &rv);
nsCOMPtr<nsIStreamConverterService> serv = do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
rv = serv->AsyncConvertData(MULTIPART_BYTERANGES,
"*/*",

View File

@ -56,8 +56,6 @@
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
class RobotSinkObserver : public nsIRobotSinkObserver {
public:
RobotSinkObserver() {
@ -253,7 +251,7 @@ extern "C" NS_EXPORT int DebugRobot(
// Create url
nsIURI* url;
nsresult rv;
nsCOMPtr<nsIIOService> service(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> service(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
nsIURI *uri = nsnull;

View File

@ -59,7 +59,6 @@ class nsIDocument;
// - IMG SRC
// - LAYER SRC
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIHTMLContentSinkIID, NS_IHTML_CONTENT_SINK_IID);
static NS_DEFINE_IID(kIRobotSinkIID, NS_IROBOTSINK_IID);
@ -289,7 +288,7 @@ void RobotSink::ProcessLink(const nsString& aLink)
if (nsnull != docURL) {
nsIURI* absurl;
nsresult rv;
nsCOMPtr<nsIIOService> service(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> service(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv)) return;
nsIURI *uri = nsnull, *baseUri = nsnull;

View File

@ -46,7 +46,6 @@
#include "nsIIOService.h"
#include "nsIChannel.h"
#include "nsILocalFile.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include "nsStringAPI.h"
#include "nsCRT.h"
@ -237,7 +236,7 @@ PageGrabber::Grab(const nsCString& aURL)
// Create the URL object...
nsCOMPtr<nsIURI> url;
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
rv = ioService->NewURI(aURL, nsnull, nsnull, getter_AddRefs(url));

View File

@ -50,7 +50,6 @@
// Class IID's
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
// Interface IID's
@ -86,7 +85,7 @@ nsresult GenerateBaselineFile(const char* aSourceFilename,const char* aBaselineF
localfile->InitWithNativePath(nsDependentCString(aSourceFilename));
nsCOMPtr<nsIURI> inputURI;
{
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv))
return rv;
rv = ioService->NewFileURI(localfile, getter_AddRefs(inputURI));

View File

@ -76,8 +76,6 @@
//----------------------------------------------------------------------
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
#ifdef MOZ_XUL
static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID);
#endif
@ -540,7 +538,7 @@ nsChromeProtocolHandler::NewURI(const nsACString &aSpec,
// Chrome: URLs (currently) have no additional structure beyond that provided
// by standard URLs, so there is no "outer" given to CreateInstance
nsCOMPtr<nsIStandardURL> url(do_CreateInstance(kStandardURLCID, &rv));
nsCOMPtr<nsIStandardURL> url(do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv));
if (NS_FAILED(rv))
return rv;

View File

@ -79,7 +79,6 @@
#include "nsDocLoader.h"
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
#ifdef PR_LOGGING
PRLogModuleInfo* nsURILoader::mLog = nsnull;
#endif
@ -676,7 +675,7 @@ nsDocumentOpenInfo::ConvertData(nsIRequest *request,
nsresult rv = NS_OK;
nsCOMPtr<nsIStreamConverterService> StreamConvService =
do_GetService(kStreamConverterServiceCID, &rv);
do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
LOG((" Got converter service"));

View File

@ -57,10 +57,6 @@
#include "nsCExternalHandlerService.h"
#include "nsIExternalProtocolService.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////
// a stub channel implemenation which will map calls to AsyncRead and OpenInputStream
// to calls in the OS for loading the url.
@ -369,7 +365,7 @@ NS_IMETHODIMP nsExternalProtocolHandler::NewURI(const nsACString &aSpec,
nsIURI **_retval)
{
nsresult rv;
nsCOMPtr<nsIURI> uri = do_CreateInstance(kSimpleURICID, &rv);
nsCOMPtr<nsIURI> uri = do_CreateInstance(NS_SIMPLEURI_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = uri->SetSpec(aSpec);

View File

@ -45,8 +45,6 @@
#include "nsIScriptSecurityManager.h"
#include "nsLiteralString.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
NS_IMPL_ISUPPORTS1(nsAbout, nsIAboutModule)
static const char kURI[] = "chrome://global/content/about.xhtml";
@ -55,7 +53,7 @@ NS_IMETHODIMP
nsAbout::NewChannel(nsIURI *aURI, nsIChannel **result)
{
nsresult rv;
nsCOMPtr<nsIIOService> ioService(do_GetService(kIOServiceCID, &rv));
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
if ( NS_FAILED(rv) )
return rv;

View File

@ -163,8 +163,6 @@ static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
#define URINC_BOOKMARKS_TOPROOT_STRING "NC:BookmarksTopRoot"
#define URINC_BOOKMARKS_ROOT_STRING "NC:BookmarksRoot"
@ -1627,11 +1625,11 @@ nsBookmarksService::Init()
rv = bm_AddRefGlobals();
if (NS_FAILED(rv)) return rv;
mNetService = do_GetService(kIOServiceCID, &rv);
mNetService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
// create cache service/session, ignoring errors
mCacheService = do_GetService(kCacheServiceCID, &rv);
mCacheService = do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
{
rv = mCacheService->CreateSession("HTTP", nsICache::STORE_ANYWHERE,