Index: net/filter/sdch_filter.h |
diff --git a/net/filter/sdch_filter.h b/net/filter/sdch_filter.h |
index e9648b1fb3e136c2ac761c183034c16203da71cd..d02989419661c3e52d269fb21be4c5c17beb2480 100644 |
--- a/net/filter/sdch_filter.h |
+++ b/net/filter/sdch_filter.h |
@@ -89,10 +89,10 @@ class NET_EXPORT_PRIVATE SdchFilter : public Filter { |
// attempted. |
bool dictionary_hash_is_plausible_; |
- // We hold an in-memory copy of the dictionary during the entire decoding, as |
- // it is used directly by the VC-DIFF decoding system. |
- // That char* data is part of the dictionary_ we hold a reference to. |
- scoped_refptr<SdchManager::Dictionary> dictionary_; |
+ // Validity of this pointer is guaranteed by either the FilterContext holding |
+ // a containing SdchManager::DictionarySet, or this object holding a |
+ // container in |unexpected_dictionary_handle_| below. |
+ const SdchManager::Dictionary *dictionary_; |
// We keep a copy of the URLRequestContext for use in the destructor, (at |
// which point GetURLRequestContext() will likely return null because of |
@@ -126,6 +126,11 @@ class NET_EXPORT_PRIVATE SdchFilter : public Filter { |
// by checking within this mime type (we may do a meta-refresh via html). |
std::string mime_type_; |
+ // If the response was encoded with a dictionary different than those |
+ // advertised (e.g. a cached response using an old dictionary), this |
+ // variable preserves that dictionary from deletion during decoding. |
+ scoped_ptr<SdchManager::DictionarySet> unexpected_dictionary_handle_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SdchFilter); |
}; |