PRBool result = PR_FALSE; nsCOMPtr<nsIPref> prefService( do_GetService( NS_PREF_CONTRACTID ) ); if ( prefService ) { prefService->GetBoolPref( "advanced.system.supportDDEExec", &result ); } if ( result ) { result = PR_FALSE;  nsCOMPtr<nsIWindowsHooks> winhooks( do_GetService( NS_IWINDOWSHOOKS_CONTRACTID ) ); if ( winhooks ) { nsCOMPtr<nsIWindowsHooksSettings> settings; nsresult rv = winhooks->GetSettings( getter_AddRefs( settings ) ); if ( NS_SUCCEEDED( rv ) ) { settings->GetIsHandlingHTTP( &result );
PRBool result = PR_FALSE;  nsCOMPtr<nsIWindowsHooks> winhooks( do_GetService( NS_IWINDOWSHOOKS_CONTRACTID ) ); if ( winhooks ) { nsCOMPtr<nsIWindowsHooksSettings> settings; nsresult rv = winhooks->GetSettings( getter_AddRefs( settings ) ); if ( NS_SUCCEEDED( rv ) ) { settings->GetIsHandlingHTTP( &result ); if ( result ) {            settings->SetIsHandlingHTTPS( PR_FALSE ); settings->SetIsHandlingFTP( PR_FALSE ); settings->SetIsHandlingCHROME( PR_FALSE ); settings->SetIsHandlingGOPHER( PR_FALSE );   settings->SetIsHandlingHTML( PR_FALSE ); settings->SetIsHandlingJPEG( PR_FALSE ); settings->SetIsHandlingGIF( PR_FALSE ); settings->SetIsHandlingPNG( PR_FALSE ); settings->SetIsHandlingMNG( PR_FALSE ); settings->SetIsHandlingBMP( PR_FALSE ); settings->SetIsHandlingICO( PR_FALSE ); settings->SetIsHandlingXML( PR_FALSE ); settings->SetIsHandlingXHTML( PR_FALSE ); settings->SetIsHandlingXUL( PR_FALSE );   settings->GetRegistryMatches( &result );
static PRBool handlingHTTP() {    PRBool result = PR_FALSE;    nsCOMPtr<nsIPref> prefService( do_GetService( NS_PREF_CONTRACTID ) );    if ( prefService ) {        prefService->GetBoolPref( "advanced.system.supportDDEExec", &result );    }    if ( result ) {        result = PR_FALSE; // Answer no if an error occurs.        // See if we're the "default browser" (i.e., handling http Internet shortcuts)                nsCOMPtr<nsIWindowsHooks> winhooks( do_GetService( NS_IWINDOWSHOOKS_CONTRACTID ) );        if ( winhooks ) {            nsCOMPtr<nsIWindowsHooksSettings> settings;            nsresult rv = winhooks->GetSettings( getter_AddRefs( settings ) );            if ( NS_SUCCEEDED( rv ) ) {                settings->GetIsHandlingHTTP( &result );            }        }    }    return result;}