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

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

Issue 459003002: Plumbs URLRequestContext and CacheBlobStorageContext down to cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache1
Patch Set: Rebase 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_storage_manager.cc
diff --git a/content/browser/service_worker/service_worker_cache_storage_manager.cc b/content/browser/service_worker/service_worker_cache_storage_manager.cc
index b8ae678dcc38b1bd8c31806720da017d3c7325b1..8523c52a7efd8a27504127dbb55438da2642c6ca 100644
--- a/content/browser/service_worker/service_worker_cache_storage_manager.cc
+++ b/content/browser/service_worker/service_worker_cache_storage_manager.cc
@@ -35,15 +35,17 @@ namespace content {
scoped_ptr<ServiceWorkerCacheStorageManager>
ServiceWorkerCacheStorageManager::Create(
const base::FilePath& path,
- base::SequencedTaskRunner* cache_task_runner) {
+ base::SequencedTaskRunner* cache_task_runner,
+ net::URLRequestContext* url_request_context,
+ ChromeBlobStorageContext* blob_storage_context) {
base::FilePath root_path = path;
if (!path.empty()) {
root_path = path.Append(ServiceWorkerContextCore::kServiceWorkerDirectory)
.AppendASCII("CacheStorage");
}
- return make_scoped_ptr(
- new ServiceWorkerCacheStorageManager(root_path, cache_task_runner));
+ return make_scoped_ptr(new ServiceWorkerCacheStorageManager(
+ root_path, cache_task_runner, url_request_context, blob_storage_context));
}
// static
@@ -51,7 +53,10 @@ scoped_ptr<ServiceWorkerCacheStorageManager>
ServiceWorkerCacheStorageManager::Create(
ServiceWorkerCacheStorageManager* old_manager) {
return make_scoped_ptr(new ServiceWorkerCacheStorageManager(
- old_manager->root_path(), old_manager->cache_task_runner()));
+ old_manager->root_path(),
+ old_manager->cache_task_runner(),
+ old_manager->url_request_context(),
+ old_manager->blob_storage_context()));
}
ServiceWorkerCacheStorageManager::~ServiceWorkerCacheStorageManager() {
@@ -121,8 +126,13 @@ void ServiceWorkerCacheStorageManager::EnumerateCaches(
ServiceWorkerCacheStorageManager::ServiceWorkerCacheStorageManager(
const base::FilePath& path,
- base::SequencedTaskRunner* cache_task_runner)
- : root_path_(path), cache_task_runner_(cache_task_runner) {
+ base::SequencedTaskRunner* cache_task_runner,
+ net::URLRequestContext* url_request_context,
+ ChromeBlobStorageContext* blob_storage_context)
+ : root_path_(path),
+ cache_task_runner_(cache_task_runner),
+ request_context_(url_request_context),
+ blob_context_(blob_storage_context) {
}
ServiceWorkerCacheStorage*
@@ -137,7 +147,9 @@ ServiceWorkerCacheStorageManager::FindOrCreateServiceWorkerCacheManager(
ServiceWorkerCacheStorage* cache_storage =
new ServiceWorkerCacheStorage(ConstructOriginPath(root_path_, origin),
memory_only,
- cache_task_runner_);
+ cache_task_runner_,
+ request_context_,
+ blob_context_);
// The map owns fetch_stores.
cache_storage_map_.insert(std::make_pair(origin, cache_storage));
return cache_storage;

Powered by Google App Engine
This is Rietveld 408576698