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..b3a7f9ea14ccf34a447cd6ff2f7c013e46ea49b2 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,22 @@ 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 once ProfileNetworkContextServiceFactory can |
+ // create a fully functional NetworkContext for Apps when the network service |
+ // is disabled. |
+ return ContentBrowserClient::CreateNetworkContext(context, in_memory, |
+ relative_partition_path); |
+} |
+ |
void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( |
content::BrowserContext* browser_context, |
const base::FilePath& storage_partition_path, |