| 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 76cf55ff5df6e51e09aad04bc60d82f0856624e6..44fdf1725f55d4c89a32e501d00bbadfd6c8c016 100644
|
| --- a/net/disk_cache/simple/simple_index.h
|
| +++ b/net/disk_cache/simple/simple_index.h
|
| @@ -14,7 +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,15 +67,14 @@ class NET_EXPORT_PRIVATE EntryMetadata {
|
|
|
| // This class is not Thread-safe.
|
| class NET_EXPORT_PRIVATE SimpleIndex
|
| - : public base::SupportsWeakPtr<SimpleIndex> {
|
| + : public base::RefCountedThreadSafe<SimpleIndex> {
|
| + friend class base::RefCountedThreadSafe<SimpleIndex>;
|
| public:
|
| SimpleIndex(
|
| const scoped_refptr<base::TaskRunner>& cache_thread,
|
| const scoped_refptr<base::TaskRunner>& io_thread,
|
| const base::FilePath& path);
|
|
|
| - virtual ~SimpleIndex();
|
| -
|
| void Initialize();
|
|
|
| void Insert(const std::string& key);
|
| @@ -105,6 +104,8 @@ 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,
|
|
|