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

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: address dcheng's comments 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
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1ef698f0f868812a0662a951ff74e4bc7b75b1a5 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -375,7 +375,9 @@ StoragePartitionImpl::StoragePartitionImpl(
storage::SpecialStoragePolicy* special_storage_policy,
HostZoomLevelContext* host_zoom_level_context,
PlatformNotificationContextImpl* platform_notification_context,
- BackgroundSyncContext* background_sync_context)
+ BackgroundSyncContext* background_sync_context,
+ scoped_refptr<webmessaging::BroadcastChannelProvider>
+ broadcast_channel_provider)
: partition_path_(partition_path),
quota_manager_(quota_manager),
appcache_service_(appcache_service),
@@ -390,8 +392,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_(std::move(broadcast_channel_provider)),
+ browser_context_(browser_context) {}
StoragePartitionImpl::~StoragePartitionImpl() {
browser_context_ = nullptr;
@@ -517,6 +519,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 +529,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(), std::move(broadcast_channel_provider));
service_worker_context->set_storage_partition(storage_partition);
@@ -599,6 +604,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,
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698