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

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

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.h
diff --git a/content/browser/service_worker/service_worker_cache_storage_manager.h b/content/browser/service_worker/service_worker_cache_storage_manager.h
index d70f08f221067a6c1ff36c9de4f764ef723a4e51..c1fbbb6541fd43e71253c217a3af25267641aaef 100644
--- a/content/browser/service_worker/service_worker_cache_storage_manager.h
+++ b/content/browser/service_worker/service_worker_cache_storage_manager.h
@@ -18,7 +18,12 @@ namespace base {
class SequencedTaskRunner;
} // namespace base
+namespace net {
+class URLRequestContext;
+}
+
namespace content {
+class ChromeBlobStorageContext;
// Keeps track of a ServiceWorkerCacheStorage per origin. There is one
// ServiceWorkerCacheStorageManager per ServiceWorkerContextCore.
@@ -28,7 +33,9 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager {
public:
static scoped_ptr<ServiceWorkerCacheStorageManager> Create(
const base::FilePath& path,
- base::SequencedTaskRunner* cache_task_runner);
+ base::SequencedTaskRunner* cache_task_runner,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_storage_context);
static scoped_ptr<ServiceWorkerCacheStorageManager> Create(
ServiceWorkerCacheStorageManager* old_manager);
@@ -63,13 +70,22 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager {
return cache_task_runner_;
}
+ net::URLRequestContext* url_request_context() const {
+ return request_context_;
+ }
+ ChromeBlobStorageContext* blob_storage_context() const {
+ return blob_context_;
+ }
+
private:
typedef std::map<GURL, ServiceWorkerCacheStorage*>
ServiceWorkerCacheStorageMap;
ServiceWorkerCacheStorageManager(
const base::FilePath& path,
- base::SequencedTaskRunner* cache_task_runner);
+ base::SequencedTaskRunner* cache_task_runner,
+ net::URLRequestContext* url_request_context,
+ ChromeBlobStorageContext* blob_storage_context);
// The returned ServiceWorkerCacheStorage* is owned by
// service_worker_cache_storages_.
@@ -83,6 +99,9 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager {
// |cache_task_runner_|.
ServiceWorkerCacheStorageMap cache_storage_map_;
+ net::URLRequestContext* request_context_;
+ ChromeBlobStorageContext* blob_context_;
+
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorageManager);
};

Powered by Google App Engine
This is Rietveld 408576698