if (! mOutFile->is_open()) { return NS_ERROR_FAILURE;
PRUint32 httpStatus; nsXPIDLCString lastmodified; nsCOMPtr<nsIHTTPChannel> pHTTPCon(do_QueryInterface(channel)); if (pHTTPCon) { pHTTPCon->GetResponseStatus(&httpStatus); if (httpStatus != 304) { mOutFile = new nsOutputFileStream(mDirSpec+mFileName); if (!mOutFile->is_open()) return NS_ERROR_FAILURE; nsCOMPtr<nsIAtom> lastmodifiedheader; lastmodifiedheader = NS_NewAtom("last-modified"); pHTTPCon->GetResponseHeader(lastmodifiedheader, getter_Copies(lastmodified)); SI_SetCharPref(pref_WalletLastModified, lastmodified); }
InputConsumer::OnStartRequest(nsIChannel* channel, nsISupports* context){    if (! mOutFile->is_open())     {       return NS_ERROR_FAILURE;    }    return NS_OK;}