Index: net/disk_cache/simple/simple_index.h |
diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h |
index 44fdf1725f55d4c89a32e501d00bbadfd6c8c016..c3db22e889b414a2c1b05048302accf5c277873c 100644 |
--- a/net/disk_cache/simple/simple_index.h |
+++ b/net/disk_cache/simple/simple_index.h |
@@ -14,6 +14,7 @@ |
#include "base/hash_tables.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/threading/thread_checker.h" |
#include "base/time.h" |
#include "net/base/net_export.h" |
@@ -67,14 +68,15 @@ class NET_EXPORT_PRIVATE EntryMetadata { |
// This class is not Thread-safe. |
class NET_EXPORT_PRIVATE SimpleIndex |
- : public base::RefCountedThreadSafe<SimpleIndex> { |
- friend class base::RefCountedThreadSafe<SimpleIndex>; |
+ : public base::SupportsWeakPtr<SimpleIndex> { |
public: |
SimpleIndex( |
- const scoped_refptr<base::TaskRunner>& cache_thread, |
- const scoped_refptr<base::TaskRunner>& io_thread, |
+ base::TaskRunner* cache_thread, |
+ base::TaskRunner* io_thread, |
const base::FilePath& path); |
+ virtual ~SimpleIndex(); |
+ |
void Initialize(); |
void Insert(const std::string& key); |
@@ -104,11 +106,9 @@ class NET_EXPORT_PRIVATE SimpleIndex |
private: |
typedef base::Callback<void(scoped_ptr<EntrySet>)> IndexCompletionCallback; |
- virtual ~SimpleIndex(); |
- |
static void LoadFromDisk( |
const base::FilePath& index_filename, |
- const scoped_refptr<base::TaskRunner>& io_thread, |
+ base::TaskRunner* io_thread, |
const IndexCompletionCallback& completion_callback); |
// Enumerates all entries' files on disk and regenerates the index. |