nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));
nsCOMPtr<nsIPref> pPref(do_GetService(NS_PREF_CONTRACTID, &rv));
static void DIR_ClearStringPref (const char *pref){    nsresult rv = NS_OK;    nsCOMPtr<nsIPref> pPref(do_GetService(kPrefCID, &rv));     if (NS_FAILED(rv) || !pPref) 		return;	char *oldDefault = nsnull;	PRInt32 prefErr = pPref->CopyDefaultCharPref (pref, &oldDefault);	DIR_ClearPrefBranch (pref);	if (prefErr >= 0)		pPref->SetDefaultCharPref (pref, oldDefault);	PR_FREEIF(oldDefault);}