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

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

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.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 41cd656e552d09afa091b32e43211fe06d77b8e2..5f22c9e00285a050ca3a0ed1dc44935b63907b96 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -22,6 +22,7 @@
#include "content/public/common/associated_interface_registry.h"
#include "content/public/common/content_client.h"
#include "content/public/common/media_stream_request.h"
+#include "content/public/common/network_service.mojom.h"
#include "content/public/common/resource_type.h"
#include "content/public/common/sandbox_type.h"
#include "content/public/common/socket_permission_request.h"
@@ -143,6 +144,10 @@ struct OpenURLParams;
struct Referrer;
struct WebPreferences;
+namespace mojom {
+class NetworkContext;
+}
+
// Embedder API (or SPI) for participating in browser logic, to be implemented
// by the client of the content browser. See ChromeContentBrowserClient for the
// principal implementation. The methods are assumed to be called on the UI
@@ -822,6 +827,18 @@ class CONTENT_EXPORT ContentBrowserClient {
// This is called on the IO thread.
virtual std::vector<std::unique_ptr<URLLoaderThrottle>>
CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter);
+
+ // Creates the main NetworkContext for a BrowserContext. It's called only once
+ // for a given BrowserContext.
+ virtual mojom::NetworkContextPtr CreateMainNetworkContext(
+ BrowserContext* context);
+
+ // Creates the main NetworkContext for a BrowserContext's StoragePartition. It
jam 2017/07/18 20:26:27 I'm having trouble seeing these two methods descri
mmenke 2017/07/18 20:57:34 I'm not sufficiently familiar with StoragePartitio
+ // can be called multiple times for a given BrowserContext.
+ virtual mojom::NetworkContextPtr CreateNetworkContextForStoragePartition(
+ BrowserContext* context,
+ bool in_memory,
+ const base::FilePath& partition_path);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698