PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - no nsIChannelSecurityInfo for %p\n",
PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - no nsITransportSecurityInfo for %p\n",
static PRInt16 GetSecurityStateFromChannel(nsIChannel* aChannel){  nsresult res;  PRInt32 securityState;  // qi for the psm information about this channel load.  nsCOMPtr<nsISupports> info;  aChannel->GetSecurityInfo(getter_AddRefs(info));  nsCOMPtr<nsIChannelSecurityInfo> psmInfo(do_QueryInterface(info));  if (!psmInfo) {    PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - no nsIChannelSecurityInfo for %p\n",                                         aChannel, (nsISupports *)info));    return nsIWebProgressListener::STATE_IS_INSECURE;  }  PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - info is %p\n", aChannel,                                       (nsISupports *)info));    res = psmInfo->GetSecurityState(&securityState);  if (!NS_SUCCEEDED(res)) {    PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - GetSecurityState failed: %d\n",                                         aChannel, res));    securityState = nsIWebProgressListener::STATE_IS_BROKEN;  }    PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState:%p - Returning %d\n", aChannel,                                       securityState));  return securityState;}