Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / net / http / http_cache.h
index dd9d0cd..8784c8a 100644 (file)
@@ -60,7 +60,6 @@ class ViewCacheHelper;
 struct HttpRequestInfo;
 
 class NET_EXPORT HttpCache : public HttpTransactionFactory,
-                             public base::SupportsWeakPtr<HttpCache>,
                              NON_EXPORTED_BASE(public base::NonThreadSafe) {
  public:
   // The cache mode of operation.
@@ -195,6 +194,8 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
   virtual HttpCache* GetCache() OVERRIDE;
   virtual HttpNetworkSession* GetSession() OVERRIDE;
 
+  base::WeakPtr<HttpCache> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
+
   // Resets the network layer to allow for tests that probe
   // network changes (e.g. host unreachable).  The old network layer is
   // returned to allow for filter patterns that only intercept
@@ -406,6 +407,8 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
 
   scoped_ptr<PlaybackCacheMap> playback_cache_map_;
 
+  base::WeakPtrFactory<HttpCache> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(HttpCache);
 };