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

Unified Diff: content/public/browser/content_browser_client.cc

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: X11 is bonkers 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/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 e32549dda7db35e682f830e735fc7071033eb7ff..ab88bd95e70ded60b9547819f0e47aa0c74b091f 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -13,12 +13,14 @@
#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/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"
@@ -477,4 +479,22 @@ ContentBrowserClient::CreateURLLoaderThrottles(
return std::vector<std::unique_ptr<URLLoaderThrottle>>();
}
+mojom::NetworkContextPtr ContentBrowserClient::CreateMainNetworkContext(
+ BrowserContext* context) {
+ mojom::NetworkContextPtr network_context;
+ mojom::NetworkContextParamsPtr context_params =
+ mojom::NetworkContextParams::New();
+ GetNetworkService()->CreateNetworkContext(MakeRequest(&network_context),
+ std::move(context_params));
+ return network_context;
+}
+
+mojom::NetworkContextPtr
+ContentBrowserClient::CreateNetworkContextForStoragePartition(
+ BrowserContext* context,
+ bool in_memory,
+ const base::FilePath& partition_path) {
+ return ContentBrowserClient::CreateMainNetworkContext(context);
jam 2017/07/18 20:26:27 should this be setting up NetworkContextParams and
mmenke 2017/07/18 20:57:34 Moot point, since I've merged it with CreateMainNe
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698