Bug 86734: Remove NS_WITH_SERVICE. r=dbaron, rs=scc, a=asa

This commit is contained in:
jaggernaut%netscape.com 2007-09-06 21:58:16 +00:00
Родитель 79d6279ae3
Коммит bf54f5dcb1
2 изменённых файлов: 10 добавлений и 9 удалений

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

@ -884,7 +884,8 @@ InternetSearchDataSource::Init()
DeferredInit(); DeferredInit();
// Register as a profile change obsevrer // Register as a profile change obsevrer
NS_WITH_SERVICE(nsIObserverService, observerService, NS_OBSERVERSERVICE_CONTRACTID, &rv); nsCOMPtr<nsIObserverService> observerService =
do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);
if (observerService) { if (observerService) {
observerService->AddObserver(this, NS_LITERAL_STRING("profile-before-change").get()); observerService->AddObserver(this, NS_LITERAL_STRING("profile-before-change").get());
observerService->AddObserver(this, NS_LITERAL_STRING("profile-do-change").get()); observerService->AddObserver(this, NS_LITERAL_STRING("profile-do-change").get());
@ -2426,8 +2427,8 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI,
char *utf8data = text.ToNewUTF8String(); char *utf8data = text.ToNewUTF8String();
if (utf8data) if (utf8data)
{ {
NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, nsCOMPtr<nsITextToSubURI> textToSubURI =
kTextToSubURICID, &rv); do_GetService(kTextToSubURICID, &rv);
if (NS_SUCCEEDED(rv) && (textToSubURI)) if (NS_SUCCEEDED(rv) && (textToSubURI))
{ {
PRUnichar *uni = nsnull; PRUnichar *uni = nsnull;
@ -3509,8 +3510,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
// "interpret/resultTranslationFont" since we always convert results to Unicode // "interpret/resultTranslationFont" since we always convert results to Unicode
if (resultEncodingStr.Length() > 0) if (resultEncodingStr.Length() > 0)
{ {
NS_WITH_SERVICE(nsICharsetConverterManager, charsetConv, nsCOMPtr<nsICharsetConverterManager> charsetConv =
kCharsetConverterManagerCID, &rv); do_GetService(kCharsetConverterManagerCID, &rv);
if (NS_SUCCEEDED(rv) && (charsetConv)) if (NS_SUCCEEDED(rv) && (charsetConv))
{ {
rv = charsetConv->GetUnicodeDecoder(&resultEncodingStr, rv = charsetConv->GetUnicodeDecoder(&resultEncodingStr,
@ -3535,8 +3536,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
char *utf8data = textTemp.ToNewUTF8String(); char *utf8data = textTemp.ToNewUTF8String();
if (utf8data) if (utf8data)
{ {
NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, nsCOMPtr<nsITextToSubURI> textToSubURI =
kTextToSubURICID, &rv); do_GetService(kTextToSubURICID, &rv);
if (NS_SUCCEEDED(rv) && (textToSubURI)) if (NS_SUCCEEDED(rv) && (textToSubURI))
{ {
PRUnichar *uni = nsnull; PRUnichar *uni = nsnull;

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

@ -301,8 +301,8 @@ LocalSearchDataSource::parseResourceIntoFindTokens(nsIRDFResource *u, findTokenP
{ {
if (!strcmp(token, "text")) if (!strcmp(token, "text"))
{ {
NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, nsCOMPtr<nsITextToSubURI> textToSubURI =
kTextToSubURICID, &rv); do_GetService(kTextToSubURICID, &rv);
if (NS_SUCCEEDED(rv) && (textToSubURI)) if (NS_SUCCEEDED(rv) && (textToSubURI))
{ {
PRUnichar *uni = nsnull; PRUnichar *uni = nsnull;