Index: content/browser/worker_host/worker_process_host.h |
=================================================================== |
--- content/browser/worker_host/worker_process_host.h (revision 154786) |
+++ content/browser/worker_host/worker_process_host.h (working copy) |
@@ -22,6 +22,7 @@ |
namespace content { |
class ResourceContext; |
+class StoragePartitionImpl; |
class WorkerServiceImpl; |
} // namespace content |
@@ -43,12 +44,14 @@ |
int worker_route_id, |
int parent_process_id, |
int64 main_resource_appcache_id, |
- content::ResourceContext* resource_context); |
+ content::ResourceContext* resource_context, |
+ content::StoragePartitionImpl* storage_partition); |
// Used for pending instances. Rest of the parameters are ignored. |
WorkerInstance(const GURL& url, |
bool shared, |
const string16& name, |
- content::ResourceContext* resource_context); |
+ content::ResourceContext* resource_context, |
+ content::StoragePartitionImpl* storage_partition); |
~WorkerInstance(); |
// Unique identifier for a worker client. |
@@ -73,7 +76,8 @@ |
bool Matches( |
const GURL& url, |
const string16& name, |
- content::ResourceContext* resource_context) const; |
+ content::ResourceContext* resource_context, |
+ content::StoragePartitionImpl* storage_partition) const; |
// Shares the passed instance's WorkerDocumentSet with this instance. This |
// instance's current WorkerDocumentSet is dereferenced (and freed if this |
@@ -98,7 +102,9 @@ |
content::ResourceContext* resource_context() const { |
return resource_context_; |
} |
- |
+ content::StoragePartitionImpl* storage_partition() const { |
+ return storage_partition_; |
+ } |
private: |
// Set of all filters (clients) associated with this worker. |
GURL url_; |
@@ -110,9 +116,11 @@ |
FilterList filters_; |
scoped_refptr<WorkerDocumentSet> worker_document_set_; |
content::ResourceContext* const resource_context_; |
+ scoped_refptr<content::StoragePartitionImpl> storage_partition_; |
}; |
- explicit WorkerProcessHost(content::ResourceContext* resource_context); |
+ explicit WorkerProcessHost(content::ResourceContext* resource_context, |
+ content::StoragePartitionImpl* storage_partition); |
virtual ~WorkerProcessHost(); |
// IPC::Sender implementation: |
@@ -195,6 +203,7 @@ |
Instances instances_; |
content::ResourceContext* const resource_context_; |
+ scoped_refptr<content::StoragePartitionImpl> storage_partition_; |
// A reference to the filter associated with this worker process. We need to |
// keep this around since we'll use it when forward messages to the worker |