observerService->Notify(nsnull, NS_LITERAL_STRING("session-logout").get(), nsnull);
observerService->NotifyObservers(nsnull, "session-logout", nsnull);
nsNativeAppSupportWin::OnLastWindowClosing( nsIXULWindow *aWindow ) {    if ( !mServerMode )        return NS_OK;    // If the last window closed is our special "turbo" window made    // in StartServerMode(), don't do anything.    nsCOMPtr<nsIDocShell> docShell;    ( void )aWindow->GetDocShell( getter_AddRefs( docShell ) );    nsCOMPtr<nsIDOMWindow> domWindow( do_GetInterface( docShell ) );    if ( domWindow == mInitialWindow ) {        mInitialWindow = nsnull;        return NS_OK;    }    nsresult rv;    if ( !mShownTurboDialog ) {        PRBool showDialog = PR_TRUE;        nsCOMPtr<nsIPref> prefService ( do_GetService( NS_PREF_CONTRACTID, &rv ) );        if ( NS_SUCCEEDED( rv ) )            prefService->GetBoolPref( "browser.turbo.showDialog", &showDialog );        nsCOMPtr<nsIDOMWindowInternal> domWindowInt ( do_GetInterface( docShell ) );        if ( showDialog && domWindowInt ) {            nsCOMPtr<nsIDOMWindow> newWindow;            mShownTurboDialog = PR_TRUE;            domWindowInt->OpenDialog( NS_LITERAL_STRING( "chrome://navigator/content/turboDialog.xul" ),                                      NS_LITERAL_STRING( "_blank" ),                                      NS_LITERAL_STRING( "chrome,modal,titlebar,centerscreen,dialog" ),                                      nsnull, getter_AddRefs( newWindow ) );        }    }    nsCOMPtr<nsIObserverService> observerService(do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv));    if (NS_FAILED(rv)) return rv;    observerService->Notify(nsnull, NS_LITERAL_STRING("session-logout").get(), nsnull);    mDidProfileStartup = PR_FALSE;    return NS_OK;}