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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 1110103003: Initial implementation of stashed message ports, content side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nicer dchecks Created 5 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
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/child/webmessageportchannel_impl.h » ('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 53c928c8188a310bf63b3b577689f626657a3c5a..7b855706ab9241df2799b5f8ba471486bc6be5c2 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -381,7 +381,8 @@ StoragePartitionImpl::StoragePartitionImpl(
HostZoomLevelContext* host_zoom_level_context,
NavigatorConnectContextImpl* navigator_connect_context,
PlatformNotificationContextImpl* platform_notification_context,
- BackgroundSyncContextImpl* background_sync_context)
+ BackgroundSyncContextImpl* background_sync_context,
+ StashedPortManager* stashed_port_manager)
: partition_path_(partition_path),
quota_manager_(quota_manager),
appcache_service_(appcache_service),
@@ -398,6 +399,7 @@ StoragePartitionImpl::StoragePartitionImpl(
navigator_connect_context_(navigator_connect_context),
platform_notification_context_(platform_notification_context),
background_sync_context_(background_sync_context),
+ stashed_port_manager_(stashed_port_manager),
browser_context_(browser_context) {
}
@@ -433,6 +435,9 @@ StoragePartitionImpl::~StoragePartitionImpl() {
if (GetBackgroundSyncContext())
GetBackgroundSyncContext()->Shutdown();
+
+ if (GetStashedPortManager())
+ GetStashedPortManager()->Shutdown();
}
StoragePartitionImpl* StoragePartitionImpl::Create(
@@ -528,6 +533,10 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
new BackgroundSyncContextImpl();
background_sync_context->Init(service_worker_context);
+ scoped_refptr<StashedPortManager> stashed_port_manager =
+ new StashedPortManager(service_worker_context);
+ stashed_port_manager->Init();
+
StoragePartitionImpl* storage_partition = new StoragePartitionImpl(
context, partition_path, quota_manager.get(), appcache_service.get(),
filesystem_context.get(), database_tracker.get(),
@@ -536,7 +545,7 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
webrtc_identity_store.get(), special_storage_policy.get(),
geofencing_manager.get(), host_zoom_level_context.get(),
navigator_connect_context.get(), platform_notification_context.get(),
- background_sync_context.get());
+ background_sync_context.get(), stashed_port_manager.get());
service_worker_context->set_storage_partition(storage_partition);
@@ -620,6 +629,10 @@ BackgroundSyncContextImpl* StoragePartitionImpl::GetBackgroundSyncContext() {
return background_sync_context_.get();
}
+StashedPortManager* StoragePartitionImpl::GetStashedPortManager() {
+ return stashed_port_manager_.get();
+}
+
void StoragePartitionImpl::ClearDataImpl(
uint32 remove_mask,
uint32 quota_storage_remove_mask,
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/child/webmessageportchannel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698