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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and slightly improved tests Created 4 years, 7 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/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,

Powered by Google App Engine
This is Rietveld 408576698