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

Unified Diff: chrome/browser/profiles/profile_io_data.h

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/profiles/profile_io_data.h
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index d4cf4d441b6f2467f98b09e51e9d16f3245916f9..f84f8aa6621e46346b9a671b02bd986140a332e5 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -30,6 +30,7 @@
#include "components/prefs/pref_member.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
+#include "content/public/common/network_service.mojom.h"
#include "extensions/features/features.h"
#include "net/cookies/cookie_monster.h"
#include "net/http/http_cache.h"
@@ -308,6 +309,12 @@ class ProfileIOData {
base::FilePath path;
IOThread* io_thread;
+
+ // Used to configure the main URLRequestContext through the IOThread's
+ // in-process network service.
+ content::mojom::NetworkContextRequest main_network_context_request;
+ content::mojom::NetworkContextParamsPtr main_network_context_params;
+
scoped_refptr<content_settings::CookieSettings> cookie_settings;
scoped_refptr<HostContentSettingsMap> host_content_settings_map;
scoped_refptr<net::SSLConfigService> ssl_config_service;
@@ -399,7 +406,7 @@ class ProfileIOData {
std::unique_ptr<previews::PreviewsIOData> previews_io_data) const;
net::URLRequestContext* main_request_context() const {
- return main_request_context_.get();
+ return main_request_context_;
}
bool initialized() const {
@@ -583,7 +590,10 @@ class ProfileIOData {
mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_;
#endif
- mutable std::unique_ptr<net::URLRequestContext> main_request_context_;
+ // The NetworkContext that owns and configures |main_request_context_|. It's
+ // set up through IOThread's NetworkService.
+ mutable std::unique_ptr<content::mojom::NetworkContext> main_network_context_;
+ mutable net::URLRequestContext* main_request_context_;
// Pointed to by the TransportSecurityState (owned by
// URLRequestContextStorage), and must be disconnected from it before it's
« no previous file with comments | « chrome/browser/net/system_network_context_manager_browsertest.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698