mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
update this test (test only, no review)
use accountmanager as a service now
This commit is contained in:
parent
152bcfadc0
commit
1b06444bd1
@ -293,7 +293,7 @@ GetHackIdentity()
|
|||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv);
|
NS_WITH_SERVICE(nsIMsgAccountManager, accountManager, NS_MSGACCOUNTMANAGER_PROGID, &rv);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
{
|
{
|
||||||
printf("Failure on Mail Session Init!\n");
|
printf("Failure on Mail Session Init!\n");
|
||||||
@ -301,16 +301,7 @@ nsresult rv;
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIMsgIdentity> identity = nsnull;
|
nsCOMPtr<nsIMsgIdentity> identity = nsnull;
|
||||||
nsCOMPtr<nsIMsgAccountManager> accountManager;
|
rv = accountManager->GetCurrentIdentity(getter_AddRefs(identity));
|
||||||
|
|
||||||
rv = mailSession->GetAccountManager(getter_AddRefs(accountManager));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
{
|
|
||||||
printf("Failure getting account Manager!\n");
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
rv = mailSession->GetCurrentIdentity(getter_AddRefs(identity));
|
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
{
|
{
|
||||||
printf("Failure getting Identity!\n");
|
printf("Failure getting Identity!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user