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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: rebase + comments v2 Created 3 years, 9 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/public/app/mojo/content_browser_manifest.json » ('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 95b3a95d9f6cf80d21592ddb2a0dd4ac238fd910..b84229dd504a1bd53397e255fe170a7bb243d0a3 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -398,6 +398,9 @@ StoragePartitionImpl::~StoragePartitionImpl() {
if (GetPlatformNotificationContext())
GetPlatformNotificationContext()->Shutdown();
+ if (GetBackgroundFetchContext())
+ GetBackgroundFetchContext()->Shutdown();
+
if (GetBackgroundSyncContext())
GetBackgroundSyncContext()->Shutdown();
@@ -489,6 +492,9 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
partition->service_worker_context_);
partition->platform_notification_context_->Initialize();
+ partition->background_fetch_context_ = new BackgroundFetchContext(
+ context, partition.get(), partition->service_worker_context_);
+
partition->background_sync_context_ = new BackgroundSyncContext();
partition->background_sync_context_->Init(partition->service_worker_context_);
@@ -566,6 +572,10 @@ StoragePartitionImpl::GetPlatformNotificationContext() {
return platform_notification_context_.get();
}
+BackgroundFetchContext* StoragePartitionImpl::GetBackgroundFetchContext() {
+ return background_fetch_context_.get();
+}
+
BackgroundSyncContext* StoragePartitionImpl::GetBackgroundSyncContext() {
return background_sync_context_.get();
}
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698