Index: content/browser/service_worker/service_worker_cache.cc |
diff --git a/content/browser/service_worker/service_worker_cache.cc b/content/browser/service_worker/service_worker_cache.cc |
index 2a626f85f285de5b54555ef0173565adbd35f4fb..f875a5aa4239b0e30b7db34e31862784a483b250 100644 |
--- a/content/browser/service_worker/service_worker_cache.cc |
+++ b/content/browser/service_worker/service_worker_cache.cc |
@@ -11,16 +11,16 @@ |
namespace content { |
// static |
-ServiceWorkerCache* ServiceWorkerCache::CreateMemoryCache( |
+scoped_ptr<ServiceWorkerCache> ServiceWorkerCache::CreateMemoryCache( |
const std::string& name) { |
- return new ServiceWorkerCache(base::FilePath(), name); |
+ return make_scoped_ptr(new ServiceWorkerCache(base::FilePath(), name)); |
} |
// static |
-ServiceWorkerCache* ServiceWorkerCache::CreatePersistentCache( |
+scoped_ptr<ServiceWorkerCache> ServiceWorkerCache::CreatePersistentCache( |
const base::FilePath& path, |
const std::string& name) { |
- return new ServiceWorkerCache(path, name); |
+ return make_scoped_ptr(new ServiceWorkerCache(path, name)); |
} |
void ServiceWorkerCache::CreateBackend( |
@@ -30,7 +30,7 @@ void ServiceWorkerCache::CreateBackend( |
ServiceWorkerCache::ServiceWorkerCache(const base::FilePath& path, |
const std::string& name) |
- : path_(path), name_(name), id_(0) { |
+ : path_(path), name_(name), id_(0), weak_ptr_factory_(this) { |
} |
ServiceWorkerCache::~ServiceWorkerCache() { |