*exists = gProfileDataAccess->ProfileExists(profileName); return NS_OK;
nsresult rv = NS_OK;   if (m_reg != nsnull) {  rv = m_reg->OpenDefault();  if (NS_SUCCEEDED(rv)) { nsIRegistry::Key key;  rv = m_reg->GetSubtree(nsIRegistry::Common, "Profiles", &key);  if (NS_SUCCEEDED(rv)) { nsIRegistry::Key newKey;   rv = m_reg->GetSubtree(key, profileName, &newKey); } else { #if defined(DEBUG_profile) printf("Registry : Couldn't get Profiles subtree.\n"); #endif } m_reg->Close(); } else { #if defined(DEBUG_profile) printf("Couldn't open registry.\n"); #endif } } else { #if defined(DEBUG_profile) printf("Registry Object is NULL.\n"); #endif  return NS_ERROR_FAILURE; }  return rv;
NS_IMETHODIMP nsProfile::ProfileExists(const PRUnichar *profileName, PRBool *exists){    NS_ENSURE_ARG_POINTER(profileName);     NS_ENSURE_ARG_POINTER(exists);    *exists = gProfileDataAccess->ProfileExists(profileName);    return NS_OK;}