nsLiteralString prefName(someData);
nsDependentString prefName(someData);
NS_IMETHODIMP nsDiskCacheObserver::Observe(nsISupports *aSubject, const PRUnichar *aTopic, const PRUnichar *someData){    nsresult rv;        // did a preference change?    if (NS_LITERAL_STRING("nsPref:changed").Equals(aTopic)) {        nsCOMPtr<nsIPref> prefs = do_QueryInterface(aSubject, &rv);        if (!prefs) {            prefs = do_GetService(NS_PREF_CONTRACTID, &rv);            if (NS_FAILED(rv)) return rv;        }                // which preference changed?        nsLiteralString prefName(someData);        if (prefName.Equals(NS_LITERAL_STRING(CACHE_DIR_PREF))) {        	nsCOMPtr<nsILocalFile> cacheDirectory;            rv = prefs->GetFileXPref(CACHE_DIR_PREF, getter_AddRefs(cacheDirectory));        	if (NS_SUCCEEDED(rv)) {                rv = ensureCacheDirectory(cacheDirectory);                if (NS_SUCCEEDED(rv))                    mDevice->setCacheDirectory(cacheDirectory);            }        } else        if (prefName.Equals(NS_LITERAL_STRING(CACHE_DISK_CAPACITY_PREF))) {            PRInt32 cacheCapacity;            rv = prefs->GetIntPref(CACHE_DISK_CAPACITY_PREF, &cacheCapacity);        	if (NS_SUCCEEDED(rv))                mDevice->setCacheCapacity(cacheCapacity * 1024);        }    }  else if (NS_LITERAL_STRING("profile-do-change").Equals(aTopic)) {        // XXX need to regenerate the cache directory. hopefully the        // cache service has already been informed of this change.        nsCOMPtr<nsIFile> profileDir;        rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,                                     getter_AddRefs(profileDir));        if (NS_SUCCEEDED(rv)) {            nsCOMPtr<nsILocalFile> cacheDirectory = do_QueryInterface(profileDir);            if (cacheDirectory) {                cacheDirectory->Append("NewCache");                // always make sure the directory exists, we may have just switched to a new profile dir.                rv = ensureCacheDirectory(cacheDirectory);                if (NS_SUCCEEDED(rv))                    mDevice->setCacheDirectory(cacheDirectory);            }        }    }        return NS_OK;}