Chromium Code Reviews| 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..ec4560a81481946aa964ba4a100d3812a139bd14 100644 |
| --- a/content/browser/service_worker/service_worker_cache_storage_manager.h |
| +++ b/content/browser/service_worker/service_worker_cache_storage_manager.h |
| @@ -18,6 +18,14 @@ namespace base { |
| class SequencedTaskRunner; |
| } // namespace base |
|
michaeln
2014/08/13 00:11:28
no need for // namespace base here
jkarlin
2014/08/13 00:34:41
Done.
|
| +namespace net { |
| +class URLRequestContext; |
| +} |
| + |
| +namespace webkit_blob { |
| +class BlobStorageContext; |
| +} |
| + |
| namespace content { |
| // Keeps track of a ServiceWorkerCacheStorage per origin. There is one |
| @@ -58,10 +66,11 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager { |
| const ServiceWorkerCacheStorage::StringsAndErrorCallback& callback); |
| // TODO(jkarlin): Add match() function. |
| - base::FilePath root_path() const { return root_path_; } |
| - scoped_refptr<base::SequencedTaskRunner> cache_task_runner() const { |
| - return cache_task_runner_; |
| - } |
| + // This must be called before creating any of the public *Cache functions |
| + // above. |
| + void SetBlobParametersForCache( |
| + net::URLRequestContext* request_context, |
| + base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context); |
| private: |
| typedef std::map<GURL, ServiceWorkerCacheStorage*> |
| @@ -76,6 +85,17 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager { |
| ServiceWorkerCacheStorage* FindOrCreateServiceWorkerCacheManager( |
| const GURL& origin); |
| + net::URLRequestContext* url_request_context() const { |
| + return request_context_; |
| + } |
| + base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context() const { |
| + return blob_context_; |
| + } |
| + base::FilePath root_path() const { return root_path_; } |
| + scoped_refptr<base::SequencedTaskRunner> cache_task_runner() const { |
| + return cache_task_runner_; |
| + } |
| + |
| base::FilePath root_path_; |
| scoped_refptr<base::SequencedTaskRunner> cache_task_runner_; |
| @@ -83,6 +103,9 @@ class CONTENT_EXPORT ServiceWorkerCacheStorageManager { |
| // |cache_task_runner_|. |
| ServiceWorkerCacheStorageMap cache_storage_map_; |
| + net::URLRequestContext* request_context_; |
| + base::WeakPtr<webkit_blob::BlobStorageContext> blob_context_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorageManager); |
| }; |