nsresult rv; nsXPIDLCString protocol; rv = aURI->GetScheme(getter_Copies(protocol)); if (NS_SUCCEEDED(rv)) { if (!PL_strcmp(protocol, "resource")) { return PR_TRUE; } }
PRBool isResource = PR_FALSE; if (NS_SUCCEEDED(aURI->SchemeIs(nsIURI::RESOURCE, &isResource)) && isResource) return PR_TRUE;
static PRBool IsResourceURI(nsIURI* aURI){  nsresult rv;  nsXPIDLCString protocol;  rv = aURI->GetScheme(getter_Copies(protocol));  if (NS_SUCCEEDED(rv)) {    if (!PL_strcmp(protocol, "resource")) {      return PR_TRUE;    }  }  return PR_FALSE;}