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

Unified Diff: content/public/browser/content_browser_client.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/public/browser/content_browser_client.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/content_browser_client.cc
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 5193ae1ea4c54ed70d145c48b18584c675fd2358..411f44f90e704bd1a4bd61bb4a7a4fe9eeac8d2a 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/guid.h"
#include "base/logging.h"
@@ -13,12 +14,15 @@
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/memory_coordinator_delegate.h"
#include "content/public/browser/navigation_ui_data.h"
+#include "content/public/browser/network_service_instance.h"
#include "content/public/browser/vpn_service_proxy.h"
+#include "content/public/common/content_features.h"
#include "content/public/common/sandbox_type.h"
#include "content/public/common/url_loader_throttle.h"
#include "media/audio/audio_manager.h"
#include "media/base/cdm_factory.h"
#include "media/media_features.h"
+#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
#include "net/ssl/client_cert_identity.h"
#include "storage/browser/quota/quota_manager.h"
#include "ui/gfx/image/image_skia.h"
@@ -483,4 +487,18 @@ ContentBrowserClient::CreateURLLoaderThrottles(
return std::vector<std::unique_ptr<URLLoaderThrottle>>();
}
+mojom::NetworkContextPtr ContentBrowserClient::CreateNetworkContext(
+ BrowserContext* context,
+ bool in_memory,
+ const base::FilePath& relative_partition_path) {
+ DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
+
+ mojom::NetworkContextPtr network_context;
+ mojom::NetworkContextParamsPtr context_params =
+ mojom::NetworkContextParams::New();
+ GetNetworkService()->CreateNetworkContext(MakeRequest(&network_context),
+ std::move(context_params));
+ return network_context;
+}
+
} // namespace content
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698