[tbb-commits] [tor-browser/tor-browser-31.6.0esr-4.5-1] Revert "TB1: Add a string-based cacheKey."

mikeperry at torproject.org mikeperry at torproject.org
Thu Apr 16 05:08:58 UTC 2015


commit 5ad57a0b24c85d19427eddebc2f647296063acfd
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Wed Apr 15 22:07:27 2015 -0700

    Revert "TB1: Add a string-based cacheKey."
    
    This reverts commit 53f8f2506cb21bf1847a4261ef383db9be55a93c. This used to be
    used by Torbutton/SafeCache, but we moved the cache isolation to direct C++
    patches instead.
---
 netwerk/base/public/nsICachingChannel.idl |    7 -------
 netwerk/protocol/http/nsHttpChannel.cpp   |   23 -----------------------
 netwerk/protocol/http/nsHttpChannel.h     |    1 -
 3 files changed, 31 deletions(-)

diff --git a/netwerk/base/public/nsICachingChannel.idl b/netwerk/base/public/nsICachingChannel.idl
index 09b1f75..9c1b0a6 100644
--- a/netwerk/base/public/nsICachingChannel.idl
+++ b/netwerk/base/public/nsICachingChannel.idl
@@ -64,13 +64,6 @@ interface nsICachingChannel : nsICacheInfoChannel
      */
     attribute nsISupports cacheKey;
 
-    /**
-     * Set/get the cache domain... uniquely identifies the data in the cache
-     * for this channel.  Holding a reference to this key does NOT prevent
-     * the cached data from being removed.
-     */
-    attribute AUTF8String cacheDomain;
-
     /**************************************************************************
      * Caching channel specific load flags:
      */
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 59ba71b..bba507e 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3271,12 +3271,6 @@ nsHttpChannel::AssembleCacheKey(const char *spec, uint32_t postID,
         cacheKey.Append(buf);
     }
 
-    if (strlen(mCacheDomain.get()) > 0) {
-        cacheKey.AppendLiteral("domain=");
-        cacheKey.Append(mCacheDomain.get());
-        cacheKey.AppendLiteral("&");
-    }
-
     if (!cacheKey.IsEmpty()) {
         cacheKey.AppendLiteral("uri=");
     }
@@ -5563,23 +5557,6 @@ nsHttpChannel::SetCacheTokenCachedCharset(const nsACString &aCharset)
                                            PromiseFlatCString(aCharset).get());
 }
 
-
-NS_IMETHODIMP
-nsHttpChannel::GetCacheDomain(nsACString &value)
-{
-    value = mCacheDomain;
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsHttpChannel::SetCacheDomain(const nsACString &value)
-{
-    mCacheDomain = value;
-
-    return NS_OK;
-}
-
 //-----------------------------------------------------------------------------
 // nsHttpChannel::nsICachingChannel
 //-----------------------------------------------------------------------------
diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
index a76ed8e..ef59c0b 100644
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -354,7 +354,6 @@ private:
     nsCOMPtr<nsICacheEntry> mOfflineCacheEntry;
     uint32_t                          mOfflineCacheLastModifiedTime;
     nsCOMPtr<nsIApplicationCache>     mApplicationCacheForWrite;
-    nsCString                         mCacheDomain;
 
     // auth specific data
     nsCOMPtr<nsIHttpChannelAuthProvider> mAuthProvider;



More information about the tbb-commits mailing list