Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: content/browser/service_worker/service_worker_cache.cc

Issue 460683002: Change threading in ServiceWorkerCacheStorage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder members Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698