Index: content/browser/storage_partition_impl.cc |
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc |
index 14cd612065d8aa1945e4463a2b26235069cf2c40..bb3128e8552fc827e95312a79eb4a238be841dbb 100644 |
--- a/content/browser/storage_partition_impl.cc |
+++ b/content/browser/storage_partition_impl.cc |
@@ -370,7 +370,8 @@ StoragePartitionImpl::StoragePartitionImpl( |
storage::SpecialStoragePolicy* special_storage_policy, |
HostZoomLevelContext* host_zoom_level_context, |
PlatformNotificationContextImpl* platform_notification_context, |
- BackgroundSyncContext* background_sync_context) |
+ BackgroundSyncContext* background_sync_context, |
+ webmessaging::BroadcastChannelService* broadcast_channel_service) |
: partition_path_(partition_path), |
quota_manager_(quota_manager), |
appcache_service_(appcache_service), |
@@ -385,8 +386,8 @@ StoragePartitionImpl::StoragePartitionImpl( |
host_zoom_level_context_(host_zoom_level_context), |
platform_notification_context_(platform_notification_context), |
background_sync_context_(background_sync_context), |
- browser_context_(browser_context) { |
-} |
+ broadcast_channel_service_(broadcast_channel_service), |
+ browser_context_(browser_context) {} |
StoragePartitionImpl::~StoragePartitionImpl() { |
browser_context_ = nullptr; |
@@ -512,6 +513,9 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
new BackgroundSyncContext(); |
background_sync_context->Init(service_worker_context); |
+ scoped_refptr<webmessaging::BroadcastChannelService> |
+ broadcast_channel_service = new webmessaging::BroadcastChannelService(); |
+ |
StoragePartitionImpl* storage_partition = new StoragePartitionImpl( |
context, partition_path, quota_manager.get(), appcache_service.get(), |
filesystem_context.get(), database_tracker.get(), |
@@ -519,7 +523,7 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
cache_storage_context.get(), service_worker_context.get(), |
webrtc_identity_store.get(), special_storage_policy.get(), |
host_zoom_level_context.get(), platform_notification_context.get(), |
- background_sync_context.get()); |
+ background_sync_context.get(), broadcast_channel_service.get()); |
service_worker_context->set_storage_partition(storage_partition); |
@@ -594,6 +598,11 @@ BackgroundSyncContext* StoragePartitionImpl::GetBackgroundSyncContext() { |
return background_sync_context_.get(); |
} |
+webmessaging::BroadcastChannelService* |
+StoragePartitionImpl::GetBroadcastChannelService() { |
+ return broadcast_channel_service_.get(); |
+} |
+ |
void StoragePartitionImpl::OpenLocalStorage( |
const url::Origin& origin, |
mojom::LevelDBObserverPtr observer, |