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

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

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.h
diff --git a/content/browser/service_worker/service_worker_cache.h b/content/browser/service_worker/service_worker_cache.h
index 3a7aea1394df4cc41df305992c9b099c605f0b63..d5ee7071e5cc07cb53c8cab493aca6c46d3a186b 100644
--- a/content/browser/service_worker/service_worker_cache.h
+++ b/content/browser/service_worker/service_worker_cache.h
@@ -9,6 +9,14 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
+namespace net {
+class URLRequestContext;
+}
+
+namespace webkit_blob {
+class BlobStorageContext;
+}
+
namespace content {
// TODO(jkarlin): Fill this in with a real Cache implementation as
@@ -23,10 +31,15 @@ namespace content {
class ServiceWorkerCache {
public:
static scoped_ptr<ServiceWorkerCache> CreateMemoryCache(
- const std::string& name);
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context);
static scoped_ptr<ServiceWorkerCache> CreatePersistentCache(
const base::FilePath& path,
- const std::string& name);
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context);
+
virtual ~ServiceWorkerCache();
// Loads the backend and calls the callback with the result (true for
@@ -42,10 +55,16 @@ class ServiceWorkerCache {
base::WeakPtr<ServiceWorkerCache> AsWeakPtr();
private:
- ServiceWorkerCache(const base::FilePath& path, const std::string& name);
+ ServiceWorkerCache(
+ const base::FilePath& path,
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_context);
base::FilePath path_;
std::string name_;
+ net::URLRequestContext* request_context_;
+ base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context_;
int32 id_;
base::WeakPtrFactory<ServiceWorkerCache> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698