Index: net/sdch/sdch_owner.h |
diff --git a/net/sdch/sdch_owner.h b/net/sdch/sdch_owner.h |
index 48a7db2ec5562b44d5dbbddf82c7732596491179..5ad2e1b913d3c85793be790188fe8586acbc78c3 100644 |
--- a/net/sdch/sdch_owner.h |
+++ b/net/sdch/sdch_owner.h |
@@ -12,6 +12,7 @@ |
#include <string> |
#include "base/macros.h" |
+#include "base/memory/memory_coordinator_client.h" |
#include "base/memory/memory_pressure_listener.h" |
#include "base/memory/ref_counted.h" |
#include "net/base/sdch_observer.h" |
@@ -31,7 +32,8 @@ class URLRequestContext; |
// exposes interface for setting SDCH policy. It should be instantiated by |
// the net/ embedder. |
// TODO(rdsmith): Implement dictionary prioritization. |
-class NET_EXPORT SdchOwner : public SdchObserver { |
+class NET_EXPORT SdchOwner : public SdchObserver, |
+ public base::MemoryCoordinatorClient { |
public: |
// Abstact storage interface for storing settings that allows the embedder |
// to provide the appropriate storage backend. |
@@ -156,9 +158,15 @@ class NET_EXPORT SdchOwner : public SdchObserver { |
DictionaryInfo& operator=(const DictionaryInfo& rhs) = default; |
}; |
+ // base::MemoryCoordinatorClient implementation: |
+ void OnMemoryStateChange(base::MemoryState state) override; |
+ |
void OnMemoryPressure( |
base::MemoryPressureListener::MemoryPressureLevel level); |
+ // Clears data to save memory usage. |
+ void ClearData(); |
+ |
// Schedule loading of all dictionaries described in |persisted_info|. |
// Returns false and does not schedule a load if |persisted_info| has an |
// unsupported version or no dictionaries key. Skips any dictionaries that are |