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

Unified Diff: chrome/browser/chrome_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
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,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/net/network_context_configuration_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698