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

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

Issue 459003002: Plumbs URLRequestContext and CacheBlobStorageContext down to cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache1
Patch Set: Addresses michaeln's comments from PS5 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 f00302191e4945f6c3ec254fa8d42c173e09c3ce..d5028f00854f1f2d1241105442ee5f1ec94bb289 100644
--- a/content/browser/service_worker/service_worker_cache.cc
+++ b/content/browser/service_worker/service_worker_cache.cc
@@ -7,20 +7,28 @@
#include <string>
#include "base/files/file_path.h"
+#include "net/url_request/url_request_context.h"
+#include "webkit/browser/blob/blob_storage_context.h"
namespace content {
// static
scoped_ptr<ServiceWorkerCache> ServiceWorkerCache::CreateMemoryCache(
- const std::string& name) {
- return make_scoped_ptr(new ServiceWorkerCache(base::FilePath(), name));
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context) {
+ return make_scoped_ptr(new ServiceWorkerCache(
+ base::FilePath(), name, request_context, blob_context));
}
// static
scoped_ptr<ServiceWorkerCache> ServiceWorkerCache::CreatePersistentCache(
const base::FilePath& path,
- const std::string& name) {
- return make_scoped_ptr(new ServiceWorkerCache(path, name));
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context) {
+ return make_scoped_ptr(
+ new ServiceWorkerCache(path, name, request_context, blob_context));
}
void ServiceWorkerCache::CreateBackend(
@@ -32,9 +40,17 @@ base::WeakPtr<ServiceWorkerCache> ServiceWorkerCache::AsWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
-ServiceWorkerCache::ServiceWorkerCache(const base::FilePath& path,
- const std::string& name)
- : path_(path), name_(name), id_(0), weak_ptr_factory_(this) {
+ServiceWorkerCache::ServiceWorkerCache(
+ const base::FilePath& path,
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context)
+ : path_(path),
+ name_(name),
+ request_context_(request_context),
+ blob_storage_context_(blob_context),
+ id_(0),
+ weak_ptr_factory_(this) {
}
ServiceWorkerCache::~ServiceWorkerCache() {

Powered by Google App Engine
This is Rietveld 408576698