return GetRootDayQueries(aTargets); } else if (aProperty == kNC_child && IsFindResource(aSource)) { return CreateFindEnumerator(aSource, aTargets); }  else if ((aProperty == kNC_Date) || (aProperty == kNC_FirstVisitDate) || (aProperty == kNC_VisitCount) || (aProperty == kNC_AgeInDays) || (aProperty == kNC_Name) || (aProperty == kNC_Hostname) || (aProperty == kNC_Referrer)) { nsresult rv;  nsCOMPtr<nsIRDFNode> target; rv = GetTarget(aSource, aProperty, aTruthValue, getter_AddRefs(target)); if (NS_FAILED(rv)) return rv;  if (rv == NS_OK) { return NS_NewSingletonEnumerator(aTargets, target);
*aTargets = result; NS_ADDREF(*aTargets); return NS_OK; } else if ((aProperty == kNC_Date) || (aProperty == kNC_VisitCount) || (aProperty == kNC_Name) || (aProperty == kNC_Referrer)) { nsresult rv;  nsCOMPtr<nsIRDFNode> target; rv = GetTarget(aSource, aProperty, aTruthValue, getter_AddRefs(target)); if (NS_FAILED(rv)) return rv;  if (rv == NS_OK) { return NS_NewSingletonEnumerator(aTargets, target); }
nsGlobalHistory::GetTargets(nsIRDFResource* aSource,                            nsIRDFResource* aProperty,                            PRBool aTruthValue,                            nsISimpleEnumerator** aTargets){  NS_PRECONDITION(aSource != nsnull, "null ptr");  if (! aSource)    return NS_ERROR_NULL_POINTER;  NS_PRECONDITION(aProperty != nsnull, "null ptr");  if (! aProperty)    return NS_ERROR_NULL_POINTER;  if (!aTruthValue)    return NS_NewEmptyEnumerator(aTargets);  NS_ENSURE_SUCCESS(OpenDB(), NS_ERROR_FAILURE);    // list all URLs off the root  if ((aSource == kNC_HistoryRoot) &&      (aProperty == kNC_child)) {    URLEnumerator* result = new URLEnumerator(kToken_URLColumn,                                              kToken_HiddenColumn);    if (! result)      return NS_ERROR_OUT_OF_MEMORY;        nsresult rv;    rv = result->Init(mEnv, mTable);    if (NS_FAILED(rv)) return rv;        *aTargets = result;    NS_ADDREF(*aTargets);    return NS_OK;  }  else if ((aSource == kNC_HistoryByDate) &&           (aProperty == kNC_child)) {    return GetRootDayQueries(aTargets);  }  else if (aProperty == kNC_child &&           IsFindResource(aSource)) {    return CreateFindEnumerator(aSource, aTargets);  }    else if ((aProperty == kNC_Date) ||           (aProperty == kNC_FirstVisitDate) ||           (aProperty == kNC_VisitCount) ||           (aProperty == kNC_AgeInDays) ||           (aProperty == kNC_Name) ||           (aProperty == kNC_Hostname) ||           (aProperty == kNC_Referrer)) {    nsresult rv;        nsCOMPtr<nsIRDFNode> target;    rv = GetTarget(aSource, aProperty, aTruthValue, getter_AddRefs(target));    if (NS_FAILED(rv)) return rv;        if (rv == NS_OK) {      return NS_NewSingletonEnumerator(aTargets, target);    }  }  // we've already answered the queries from the root, so we must be  // looking for real entries  return NS_NewEmptyEnumerator(aTargets);}