}  if (n == PERMISSION_P3P) {
COOKIE_RegisterPrefCallbacks(void) {  PRInt32 n;  PRBool x;  nsresult rv;  nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));  if (!prefs) {    return;  }  // Initialize for cookie_behaviorPref  if (NS_FAILED(prefs->GetIntPref(cookie_behaviorPref, &n))) {    n = PERMISSION_Accept;  }  if (n == PERMISSION_P3P) {    // load p3p dll//!!!!!    nsCOMPtr<nsIP3PService> p3p(do_GetService(NS_P3PSERVICE_CONTRACTID));//!!!!!    if (!p3p) return;  }  cookie_SetBehaviorPref((PERMISSION_BehaviorEnum)n);  prefs->RegisterCallback(cookie_behaviorPref, cookie_BehaviorPrefChanged, nsnull);  // Initialize for cookie_warningPref  if (NS_FAILED(prefs->GetBoolPref(cookie_warningPref, &x))) {    x = PR_FALSE;  }  cookie_SetWarningPref(x);  prefs->RegisterCallback(cookie_warningPref, cookie_WarningPrefChanged, nsnull);  // Initialize for cookie_lifetime  cookie_SetLifetimePref(COOKIE_Normal);  cookie_lifetimeDays = 90;  cookie_lifetimeCurrentSession = PR_FALSE;  if (NS_SUCCEEDED(prefs->GetIntPref(cookie_lifetimeDaysPref, &n))) {    cookie_lifetimeDays = n;  }  if (NS_SUCCEEDED(prefs->GetIntPref(cookie_lifetimeBehaviorPref, &n))) {    cookie_lifetimeCurrentSession = (n==0);    cookie_SetLifetimeLimit((n==0) ? 0 : cookie_lifetimeDays);  }  if (NS_SUCCEEDED(prefs->GetBoolPref(cookie_lifetimeEnabledPref, &n))) {    cookie_SetLifetimePref(n ? COOKIE_Trim : COOKIE_Normal);  }  prefs->RegisterCallback(cookie_lifetimeEnabledPref, cookie_LifetimeEnabledPrefChanged, nsnull);  prefs->RegisterCallback(cookie_lifetimeBehaviorPref, cookie_LifetimeBehaviorPrefChanged, nsnull);  prefs->RegisterCallback(cookie_lifetimeDaysPref, cookie_LifetimeDaysPrefChanged, nsnull);  // Override cookie_lifetime initialization if the older prefs (with no UI) are used  if (NS_SUCCEEDED(prefs->GetIntPref(cookie_lifetimePref, &n))) {    cookie_SetLifetimePref((COOKIE_LifetimeEnum)n);  }  prefs->RegisterCallback(cookie_lifetimePref, cookie_LifetimeOptPrefChanged, nsnull);  if (NS_SUCCEEDED(prefs->GetIntPref(cookie_lifetimeValue, &n))) {    cookie_SetLifetimeLimit(n);  }  prefs->RegisterCallback(cookie_lifetimeValue, cookie_LifetimeLimitPrefChanged, nsnull);  // Initialize for P3P prefs  if (NS_FAILED(prefs->CopyCharPref(cookie_p3pPref, &cookie_P3P))) {    cookie_P3P = PL_strdup(cookie_P3P_Default);  }  prefs->RegisterCallback(cookie_p3pPref, cookie_P3PPrefChanged, nsnull);}