Index: content/browser/service_worker/service_worker_context_wrapper.h |
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h |
index 56367eee1cebbe645a0e4dc537f57aa68eec1d45..9d062d4e049015fd27d074368adcbed4b4a4704e 100644 |
--- a/content/browser/service_worker/service_worker_context_wrapper.h |
+++ b/content/browser/service_worker/service_worker_context_wrapper.h |
@@ -35,6 +35,7 @@ class BrowserContext; |
class ChromeBlobStorageContext; |
class ServiceWorkerContextCore; |
class ServiceWorkerContextObserver; |
+class StoragePartitionImpl; |
// A refcounted wrapper class for our core object. Higher level content lib |
// classes keep references to this class on mutliple threads. The inner core |
@@ -48,7 +49,8 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper |
// Init and Shutdown are for use on the UI thread when the profile, |
// storagepartition is being setup and torn down. |
- void Init(const base::FilePath& user_data_directory, |
+ void Init(StoragePartitionImpl* storage_partition, |
+ const base::FilePath& user_data_directory, |
storage::QuotaManagerProxy* quota_manager_proxy, |
storage::SpecialStoragePolicy* special_storage_policy); |
void Shutdown(); |
@@ -61,6 +63,9 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper |
// The core context is only for use on the IO thread. |
ServiceWorkerContextCore* context(); |
+ // The StoragePartition should only be used on the UI thread. |
michaeln
2015/01/13 21:27:32
Also say that it may be null before/during init an
mlamouri (slow - plz ping)
2015/01/14 15:46:24
Done.
|
+ StoragePartitionImpl* storage_partition() const; |
+ |
// The process manager can be used on either UI or IO. |
ServiceWorkerProcessManager* process_manager() { |
return process_manager_.get(); |
@@ -130,6 +135,9 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper |
// Initialized in Init(); true if the user data directory is empty. |
bool is_incognito_; |
+ |
+ // WeakPtr to the StoragePartitionImpl owning |this|. |
michaeln
2015/01/13 21:27:32
Actual use of the WeakPtr<> template here might he
mlamouri (slow - plz ping)
2015/01/14 15:46:24
I would prefer not to abuse WeakPtr<> in order to
|
+ StoragePartitionImpl* storage_partition_; |
}; |
} // namespace content |