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

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: try to fix ios gyp build Created 4 years, 6 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 cb7db334b0d0a618f690eff9fafd7fc3b1c54bb2..c4d966a015e0789ac9abbc6ef30ac641cfe32315 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -375,7 +375,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::BroadcastChannelProvider* broadcast_channel_provider)
: partition_path_(partition_path),
quota_manager_(quota_manager),
appcache_service_(appcache_service),
@@ -390,8 +391,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_provider_(broadcast_channel_provider),
+ browser_context_(browser_context) {}
StoragePartitionImpl::~StoragePartitionImpl() {
browser_context_ = nullptr;
@@ -517,6 +518,9 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
new BackgroundSyncContext();
background_sync_context->Init(service_worker_context);
+ scoped_refptr<webmessaging::BroadcastChannelProvider>
+ broadcast_channel_provider = new webmessaging::BroadcastChannelProvider();
+
StoragePartitionImpl* storage_partition = new StoragePartitionImpl(
context, partition_path, quota_manager.get(), appcache_service.get(),
filesystem_context.get(), database_tracker.get(),
@@ -524,7 +528,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_provider.get());
service_worker_context->set_storage_partition(storage_partition);
@@ -599,6 +603,11 @@ BackgroundSyncContext* StoragePartitionImpl::GetBackgroundSyncContext() {
return background_sync_context_.get();
}
+webmessaging::BroadcastChannelProvider*
+StoragePartitionImpl::GetBroadcastChannelProvider() {
+ return broadcast_channel_provider_.get();
+}
+
void StoragePartitionImpl::OpenLocalStorage(
const url::Origin& origin,
mojom::LevelDBObserverPtr observer,

Powered by Google App Engine
This is Rietveld 408576698