nsCOMPtr<nsIPrefBranchInternal> prefBranch = do_QueryInterface(mPrefService, &rv); if (NS_SUCCEEDED(rv)) rv = prefBranch->AddObserver(aDomain, aObserver); return rv;
mObservers->AppendElement(observer); mObserverDomains.AppendCString(nsCAutoString(domain));  return RegisterCallback(domain, NotifyObserver, observer);
NS_IMETHODIMP nsPref::AddObserver(const char *aDomain, nsIObserver *aObserver){  nsresult rv;  nsCOMPtr<nsIPrefBranchInternal> prefBranch = do_QueryInterface(mPrefService, &rv);  if (NS_SUCCEEDED(rv))    rv = prefBranch->AddObserver(aDomain, aObserver);  return rv;}