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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 2936623002: Implement dumb URLLoader{Factory} for ServiceWorker script loading (for try)
Patch Set: . Created 3 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 5c4270512f9614eafefc00b3d70723b7c9f8f3cd..a98bb2077e3f5ccfea307636dbff4944587a008c 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -496,8 +496,6 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
partition->cache_storage_context_->Init(path, quota_manager_proxy);
partition->service_worker_context_ = new ServiceWorkerContextWrapper(context);
- partition->service_worker_context_->Init(path, quota_manager_proxy.get(),
- context->GetSpecialStoragePolicy());
partition->service_worker_context_->set_storage_partition(partition.get());
partition->appcache_service_ =
@@ -529,6 +527,9 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap();
+ scoped_refptr<ChromeBlobStorageContext> blob_context =
+ ChromeBlobStorageContext::GetFor(context);
+
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableNetworkService)) {
mojom::NetworkServicePtr network_service;
@@ -542,8 +543,6 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
network_service->CreateNetworkContext(
MakeRequest(&partition->network_context_), std::move(context_params));
- scoped_refptr<ChromeBlobStorageContext> blob_context =
- ChromeBlobStorageContext::GetFor(context);
BlobURLLoaderFactory::BlobContextGetter blob_getter =
base::BindOnce(&BlobStorageContextGetter, blob_context);
partition->blob_url_loader_factory_ = new BlobURLLoaderFactory(
@@ -553,6 +552,10 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
partition->url_loader_factory_getter_->Initialize(partition.get());
}
+ partition->service_worker_context_->Init(
+ path, quota_manager_proxy.get(), context->GetSpecialStoragePolicy(),
+ blob_context.get(), partition->url_loader_factory_getter_.get());
+
return partition;
}

Powered by Google App Engine
This is Rietveld 408576698