rv = observerService->RemoveObserver(this, NS_LITERAL_STRING("profile-before-change").get());
rv = observerService->RemoveObserver(this, "profile-before-change");
nsCacheProfilePrefObserver::Remove(){    nsresult rv, rv2 = NS_OK;    // remove Observer Service observers    nsCOMPtr<nsIObserverService> observerService = do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);    if (NS_FAILED(rv)) return rv;    NS_ENSURE_ARG(observerService);    rv = observerService->RemoveObserver(this, NS_LITERAL_STRING("profile-before-change").get());    if (NS_FAILED(rv)) rv2 = rv;        rv = observerService->RemoveObserver(this, NS_LITERAL_STRING("profile-after-change").get());    if (NS_FAILED(rv)) rv2 = rv;    rv = observerService->RemoveObserver(this, NS_LITERAL_STRING(NS_XPCOM_SHUTDOWN_OBSERVER_ID).get());    if (NS_FAILED(rv)) rv2 = rv;    // remove Pref Service observers    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;    // remove Disk cache pref observers    rv  = prefInternal->RemoveObserver(DISK_CACHE_ENABLE_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;    rv  = prefInternal->RemoveObserver(DISK_CACHE_CAPACITY_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;    rv  = prefInternal->RemoveObserver(DISK_CACHE_DIR_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;        // remove Memory cache pref observers    rv = prefInternal->RemoveObserver(MEMORY_CACHE_ENABLE_PREF, this);    if (NS_FAILED(rv)) rv2 = rv;    rv = prefInternal->RemoveObserver(MEMORY_CACHE_CAPACITY_PREF, this);    // if (NS_FAILED(rv)) rv2 = rv;    return NS_SUCCEEDED(rv) ? rv2 : rv;}