nsCookieStatus cookieStatus = cookie_CheckPrefs(aHostURI, aFirstURI, aHttpChannel, aCookieHeader);
nsCookieStatus cookieStatus = cookie_CheckPrefs(aHostURI, aFirstURI, aChannel, aCookieHeader);
COOKIE_SetCookie(nsIURI         *aHostURI,                 nsIURI         *aFirstURI,                 nsIPrompt      *aPrompt,                 const char     *aCookieHeader,                 const char     *aServerTime,                 nsIHttpChannel *aHttpChannel){  if (!aHostURI) {    COOKIE_LOGFAILURE(SET_COOKIE, nsnull, aCookieHeader, "host URI is null");    return;  }  // check default prefs  nsCookieStatus cookieStatus = cookie_CheckPrefs(aHostURI, aFirstURI, aHttpChannel, aCookieHeader);  // update UI icon, and return, if cookie was rejected.  // should we be doing this just for p3p?  if (cookieStatus == nsICookie::STATUS_REJECTED) {    nsCOMPtr<nsIObserverService> os(do_GetService("@mozilla.org/observer-service;1"));    if (os) {      os->NotifyObservers(nsnull, "cookieIcon", NS_LITERAL_STRING("on").get());    }    return;  }  // get the site's p3p policy now (common to all cookies)  nsCookiePolicy cookiePolicy = cookie_GetPolicy(P3P_SitePolicy(aHostURI, aHttpChannel));  // parse server local time. this is not just done here for efficiency  // reasons - if there's an error parsing it, and we need to default it  // to the current time, we must do it here since the current time in  // SetCookieInternal() will change for each cookie processed (e.g. if the  // user is prompted).  nsInt64 serverTime;  PRTime tempServerTime;  if (aServerTime && PR_ParseTimeString(aServerTime, PR_TRUE, &tempServerTime) == PR_SUCCESS) {    serverTime = nsInt64(tempServerTime) / USEC_PER_SEC;  } else {    serverTime = NOW_IN_SECONDS;  }  // switch to a nice string type now, and process each cookie in the header  nsDependentCString cookieHeader(aCookieHeader);  while (cookie_SetCookieInternal(aHostURI,                                  cookieHeader, serverTime,                                  cookieStatus, cookiePolicy));}