From 1b06444bd1157769ae12104b5381dc17d05eeef3 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Thu, 2 Dec 1999 06:28:42 +0000 Subject: [PATCH] update this test (test only, no review) use accountmanager as a service now --- mailnews/compose/tests/sendpage/Test.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/mailnews/compose/tests/sendpage/Test.cpp b/mailnews/compose/tests/sendpage/Test.cpp index 0ed35dbe74d3..cf781432a889 100644 --- a/mailnews/compose/tests/sendpage/Test.cpp +++ b/mailnews/compose/tests/sendpage/Test.cpp @@ -293,7 +293,7 @@ GetHackIdentity() { nsresult rv; - NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv); + NS_WITH_SERVICE(nsIMsgAccountManager, accountManager, NS_MSGACCOUNTMANAGER_PROGID, &rv); if (NS_FAILED(rv)) { printf("Failure on Mail Session Init!\n"); @@ -301,16 +301,7 @@ nsresult rv; } nsCOMPtr identity = nsnull; - nsCOMPtr accountManager; - - rv = mailSession->GetAccountManager(getter_AddRefs(accountManager)); - if (NS_FAILED(rv)) - { - printf("Failure getting account Manager!\n"); - return nsnull; - } - - rv = mailSession->GetCurrentIdentity(getter_AddRefs(identity)); + rv = accountManager->GetCurrentIdentity(getter_AddRefs(identity)); if (NS_FAILED(rv)) { printf("Failure getting Identity!\n");