nsHistoryDataSource::getSiteOfURL(char* url, nsIRDFResource** resource)
nsHistoryDataSource::getSiteOfURL(const char* url, nsIRDFResource** resource)
nsHistoryDataSource::getSiteOfURL(char* url, nsIRDFResource** resource){	char* str = strstr(url, "://");	char buff[256];	nsIRDFLiteral  *titleLiteral;	PRBool foundp;	if (!str) return NS_ERROR_FAILURE;	str = str + 3;	if (str[0] == '/') str++;	char* estr = strchr(str, '/');	if (!estr) estr = str + strlen(str);	if ((estr - str) > 256) return NS_ERROR_FAILURE;	memset(buff, '\0', 256);	// Note: start with "NC:" so that URL won't be shown	static const char kHistoryURLPrefix[] = "NC:hst:site?";	strcpy(buff, kHistoryURLPrefix);	strncat(buff, str, (estr-str));	if (NS_OK != gRDFService->FindResource(buff, resource, &foundp)) return NS_ERROR_FAILURE;	if (foundp) return NS_OK;	if (NS_OK != gRDFService->GetResource(buff, resource)) return NS_ERROR_FAILURE;	mInner->Assert(mResourceHistoryBySite,  mResourceChild, *resource, 1);	nsAutoString ptitle(buff + sizeof(kHistoryURLPrefix) - 1);		gRDFService->GetLiteral(ptitle, &titleLiteral);	mInner->Assert(*resource, mResourceTitle, titleLiteral, 1);	return NS_OK;}