NS_ENSURE_ARG_POINTER(aUsageReport); char* result = nsCRT::strdup("disk cache usage report"); if (!result) return NS_ERROR_OUT_OF_MEMORY; *aUsageReport = result;
NS_ENSURE_ARG_POINTER(usageReport); nsCString buffer;  buffer.Assign("<table>\n");  buffer.Append("<tr><td><b>Cache Directory:</b></td><td><tt> "); nsCOMPtr<nsILocalFile> cacheDir; char *                 path; mDevice->getCacheDirectory(getter_AddRefs(cacheDir)); nsresult rv = cacheDir->GetPath(&path); if (NS_SUCCEEDED(rv)) { buffer.Append(path); } else { buffer.Append("directory unavailable"); } buffer.Append("</tt></td></tr>");  buffer.Append("</table>"); *usageReport = buffer.ToNewCString(); if (!*usageReport) return NS_ERROR_OUT_OF_MEMORY;
NS_IMETHODIMP nsDiskCacheDeviceInfo::GetUsageReport(char ** aUsageReport){    NS_ENSURE_ARG_POINTER(aUsageReport);    char* result = nsCRT::strdup("disk cache usage report");    if (!result) return NS_ERROR_OUT_OF_MEMORY;    *aUsageReport = result;    return NS_OK;}