| Index: content/browser/storage_partition_impl.cc
|
| diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
|
| index 32a960d4ae61f397293b9a8a35cefe43e8604910..9b25699c18e2b141f707af3c568ffc772c9c5506 100644
|
| --- a/content/browser/storage_partition_impl.cc
|
| +++ b/content/browser/storage_partition_impl.cc
|
| @@ -30,7 +30,6 @@
|
| #include "content/public/browser/dom_storage_context.h"
|
| #include "content/public/browser/indexed_db_context.h"
|
| #include "content/public/browser/local_storage_usage_info.h"
|
| -#include "content/public/browser/network_service_instance.h"
|
| #include "content/public/browser/session_storage_usage_info.h"
|
| #include "content/public/common/content_client.h"
|
| #include "content/public/common/content_features.h"
|
| @@ -514,13 +513,16 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
|
| ChromeBlobStorageContext::GetFor(context);
|
|
|
| if (base::FeatureList::IsEnabled(features::kNetworkService)) {
|
| - mojom::NetworkContextParamsPtr context_params =
|
| - mojom::NetworkContextParams::New();
|
| - // TODO: fill this
|
| - // context_params->cache_dir =
|
| - // context_params->cookie_path =
|
| - GetNetworkService()->CreateNetworkContext(
|
| - MakeRequest(&partition->network_context_), std::move(context_params));
|
| + if (relative_partition_path.empty()) {
|
| + partition->network_context_ =
|
| + GetContentClient()->browser()->CreateMainNetworkContext(context);
|
| + } else {
|
| + partition->network_context_ =
|
| + GetContentClient()
|
| + ->browser()
|
| + ->CreateNetworkContextForStoragePartition(context, in_memory,
|
| + partition_path);
|
| + }
|
|
|
| BlobURLLoaderFactory::BlobContextGetter blob_getter =
|
| base::BindOnce(&BlobStorageContextGetter, blob_context);
|
| @@ -556,6 +558,11 @@ StoragePartitionImpl::GetMediaURLRequestContext() {
|
| return media_url_request_context_.get();
|
| }
|
|
|
| +mojom::NetworkContext* StoragePartitionImpl::GetNetworkContext() {
|
| + DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
|
| + return network_context_.get();
|
| +}
|
| +
|
| storage::QuotaManager* StoragePartitionImpl::GetQuotaManager() {
|
| return quota_manager_.get();
|
| }
|
|
|