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

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: 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..70ede7628083b21ee490e221e051d0bf3a787ce2 100644
--- a/content/browser/service_worker/service_worker_cache.cc
+++ b/content/browser/service_worker/service_worker_cache.cc
@@ -7,20 +7,27 @@
#include <string>
#include "base/files/file_path.h"
+#include "content/browser/fileapi/chrome_blob_storage_context.h"
+#include "net/url_request/url_request_context.h"
namespace content {
// static
ServiceWorkerCache* ServiceWorkerCache::CreateMemoryCache(
- const std::string& name) {
- return new ServiceWorkerCache(base::FilePath(), name);
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context) {
+ return new ServiceWorkerCache(
+ base::FilePath(), name, request_context, blob_context);
}
// static
ServiceWorkerCache* ServiceWorkerCache::CreatePersistentCache(
const base::FilePath& path,
- const std::string& name) {
- return new ServiceWorkerCache(path, name);
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context) {
+ return new ServiceWorkerCache(path, name, request_context, blob_context);
}
void ServiceWorkerCache::CreateBackend(
@@ -29,8 +36,14 @@ void ServiceWorkerCache::CreateBackend(
}
ServiceWorkerCache::ServiceWorkerCache(const base::FilePath& path,
- const std::string& name)
- : path_(path), name_(name), id_(0) {
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context)
+ : path_(path),
+ name_(name),
+ request_context_(request_context),
+ blob_storage_context_(blob_context),
+ id_(0) {
}
ServiceWorkerCache::~ServiceWorkerCache() {

Powered by Google App Engine
This is Rietveld 408576698