rv = observerService->AddObserver(this, NS_LITERAL_STRING("profile-after-change").get());
rv = observerService->AddObserver(this, "profile-after-change", PR_FALSE);
nsCacheProfilePrefObserver::Install(){    nsresult rv, rv2 = NS_OK;        // install profile-change observer    nsCOMPtr<nsIObserverService> observerService = do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);    if (NS_FAILED(rv)) return rv;    NS_ENSURE_ARG(observerService);        rv = observerService->AddObserver(this, NS_LITERAL_STRING("profile-before-change").get());    if (NS_FAILED(rv)) rv2 = rv;        rv = observerService->AddObserver(this, NS_LITERAL_STRING("profile-after-change").get());    if (NS_FAILED(rv)) rv2 = rv;    // install xpcom shutdown observer    rv = observerService->AddObserver(this, NS_LITERAL_STRING(NS_XPCOM_SHUTDOWN_OBSERVER_ID).get());    if (NS_FAILED(rv)) rv2 = rv;            // install preferences observer    nsCOMPtr<nsIPrefService> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);    if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsIPrefBranchInternal> prefInternal = do_QueryInterface(prefService, &rv);    if (NS_FAILED(rv)) return rv;    rv = prefInternal->AddObserver(MEMORY_CACHE_ENABLE_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;    rv = prefInternal->AddObserver(DISK_CACHE_ENABLE_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;        rv = prefInternal->AddObserver(DISK_CACHE_DIR_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;        rv = prefInternal->AddObserver(DISK_CACHE_CAPACITY_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;        rv = prefInternal->AddObserver(MEMORY_CACHE_CAPACITY_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;        rv = ReadPrefs();        return NS_SUCCEEDED(rv) ? rv2 : rv;}