NS_WITH_SERVICE(nsIObserverService, anObserverService, NS_OBSERVERSERVICE_CONTRACTID, &res);
NS_WITH_SERVICE(nsIObserverService, anObserverService, NS_OBSERVERSERVICE_PROGID, &res);
NS_IMETHODIMP nsMetaCharsetObserver::End() {    nsresult res = NS_OK;  if (bMetaCharsetObserverStarted == PR_TRUE)  {    bMetaCharsetObserverStarted = PR_FALSE;    NS_WITH_SERVICE(nsIObserverService, anObserverService, NS_OBSERVERSERVICE_CONTRACTID, &res);    if (NS_FAILED(res)) return res;         nsAutoString htmlTopic; htmlTopic.AssignWithConversion(kHTMLTextContentType);    res = anObserverService->RemoveObserver(this, htmlTopic.get());  }  return res;}