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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Add some docs to network_context.h 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: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 2a6c4cb5e480edfd3a234224490b7a75f09266c8..61d4b565a85aad9a6d365e7873d72ea188204f94 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -53,6 +53,8 @@
#include "chrome/browser/memory/chrome_memory_coordinator_delegate.h"
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
+#include "chrome/browser/net/profile_network_context_service.h"
+#include "chrome/browser/net/profile_network_context_service_factory.h"
#include "chrome/browser/net_benchmarking.h"
#include "chrome/browser/notifications/platform_notification_service_impl.h"
#include "chrome/browser/page_load_metrics/experiments/delay_navigation_throttle.h"
@@ -2686,6 +2688,20 @@ void ChromeContentBrowserClient::GetURLRequestAutoMountHandlers(
return g_browser_process->rappor_service();
}
+content::mojom::NetworkContextPtr
+ChromeContentBrowserClient::CreateNetworkContext(
+ content::BrowserContext* context,
+ bool in_memory,
+ const base::FilePath& relative_partition_path) {
+ if (relative_partition_path.empty()) {
+ return ProfileNetworkContextServiceFactory::GetForContext(context)
+ ->CreateMainNetworkContext();
+ }
+ // TODO(mmenke): Implement this.
Randy Smith (Not in Mondays) 2017/07/20 17:38:34 nit, suggestion: Enhance TODO to indicate what's m
Randy Smith (Not in Mondays) 2017/07/20 17:38:34 Confirming that this TODO is basically parallel to
mmenke 2017/07/20 18:31:30 Not quite analogous - I'm not sure it will even ma
mmenke 2017/07/20 18:31:30 Done. Left this pretty general ("Implement this o
+ return ContentBrowserClient::CreateNetworkContext(context, in_memory,
+ relative_partition_path);
+}
+
void ChromeContentBrowserClient::GetAdditionalFileSystemBackends(
content::BrowserContext* browser_context,
const base::FilePath& storage_partition_path,

Powered by Google App Engine
This is Rietveld 408576698