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

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: 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 d8709690f22e8362bb9f04e524dbd50432c8d0ed..8fa03796604d8bc30730c41faa63da641357efc7 100644
--- a/content/browser/service_worker/service_worker_cache.h
+++ b/content/browser/service_worker/service_worker_cache.h
@@ -8,8 +8,14 @@
#include "base/callback.h"
#include "base/files/file_path.h"
+namespace net {
+class URLRequestContext;
+}
+
namespace content {
+class ChromeBlobStorageContext;
+
// TODO(jkarlin): Fill this in with a real Cache implementation as
// specified in
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html.
@@ -21,9 +27,15 @@ namespace content {
// InitializeIfNeeded must be called before calling the other public members.
class ServiceWorkerCache {
public:
- static ServiceWorkerCache* CreateMemoryCache(const std::string& name);
- static ServiceWorkerCache* CreatePersistentCache(const base::FilePath& path,
- const std::string& name);
+ static ServiceWorkerCache* CreateMemoryCache(
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context);
michaeln 2014/08/12 03:48:52 Since these classes are used on the IO thread, it
+ static ServiceWorkerCache* CreatePersistentCache(
+ const base::FilePath& path,
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context);
virtual ~ServiceWorkerCache();
// Loads the backend and calls the callback with the result (true for
@@ -37,10 +49,15 @@ class ServiceWorkerCache {
void set_id(int32 id) { id_ = id; }
private:
- ServiceWorkerCache(const base::FilePath& path, const std::string& name);
+ ServiceWorkerCache(const base::FilePath& path,
+ const std::string& name,
+ net::URLRequestContext* request_context,
+ ChromeBlobStorageContext* blob_context);
base::FilePath path_;
std::string name_;
+ net::URLRequestContext* request_context_;
michaeln 2014/08/12 03:48:52 always makes me queasy to see the rawptrs, but wha
+ ChromeBlobStorageContext* blob_storage_context_;
michaeln 2014/08/12 03:48:52 ditto base::WeakPtr<webkit_blob::BlobStorageContex
int32 id_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCache);

Powered by Google App Engine
This is Rietveld 408576698