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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Response to comments Created 3 years, 5 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/browser/url_loader_factory_getter.cc » ('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 32a960d4ae61f397293b9a8a35cefe43e8604910..d39ea8d3e59b554cafc53870e6a9290df9f6ed3f 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,9 @@ 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));
+ partition->network_context_ =
+ GetContentClient()->browser()->CreateNetworkContext(
+ context, in_memory, relative_partition_path);
BlobURLLoaderFactory::BlobContextGetter blob_getter =
base::BindOnce(&BlobStorageContextGetter, blob_context);
@@ -556,6 +551,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();
}
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/browser/url_loader_factory_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698