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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 2968293002: Introduce SystemNetworkContextManager. (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
Index: content/browser/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 9bc18af4c79e096f72a4cfe37e23b4be457dec88..93580df6a9ae95695fcf922c99224089e833b143 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -29,12 +29,11 @@
#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"
#include "content/public/common/content_switches.h"
-#include "content/public/common/service_manager_connection.h"
-#include "content/public/common/service_names.mojom.h"
#include "net/base/completion_callback.h"
#include "net/base/net_errors.h"
#include "net/cookies/canonical_cookie.h"
@@ -42,7 +41,6 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "ppapi/features/features.h"
-#include "services/service_manager/public/cpp/connector.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "storage/browser/database/database_tracker.h"
#include "storage/browser/quota/quota_manager.h"
@@ -531,20 +529,13 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap();
if (base::FeatureList::IsEnabled(features::kNetworkService)) {
- static mojom::NetworkServicePtr* g_network_service =
- new mojom::NetworkServicePtr;
- if (!g_network_service->is_bound()) {
- ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
- mojom::kNetworkServiceName, g_network_service);
- }
mojom::NetworkContextParamsPtr context_params =
mojom::NetworkContextParams::New();
// TODO: fill this
// context_params->cache_dir =
// context_params->cookie_path =
- (*g_network_service)
- ->CreateNetworkContext(MakeRequest(&partition->network_context_),
- std::move(context_params));
+ GetNetworkService()->CreateNetworkContext(
+ MakeRequest(&partition->network_context_), std::move(context_params));
scoped_refptr<ChromeBlobStorageContext> blob_context =
ChromeBlobStorageContext::GetFor(context);

Powered by Google App Engine
This is Rietveld 408576698