diff options
Diffstat (limited to 'src/core/net/system_network_context_manager.h')
-rw-r--r-- | src/core/net/system_network_context_manager.h | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/src/core/net/system_network_context_manager.h b/src/core/net/system_network_context_manager.h index 288af5195..48cd99173 100644 --- a/src/core/net/system_network_context_manager.h +++ b/src/core/net/system_network_context_manager.h @@ -46,16 +46,10 @@ #define SYSTEM_NETWORK_CONTEXT_MANAGER_H_ #include <memory> -#include <string> -#include <vector> #include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/optional.h" -#include "services/network/public/mojom/host_resolver.mojom-forward.h" #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/network_service.mojom-forward.h" -#include "services/network/public/mojom/ssl_config.mojom-forward.h" #include "services/network/public/mojom/url_loader_factory.mojom-forward.h" #include "net/proxy_config_monitor.h" @@ -67,10 +61,6 @@ class URLLoaderFactory; class SharedURLLoaderFactory; } // namespace network -namespace net_log { -class NetExportFileWriter; -} - // Responsible for creating and managing access to the system NetworkContext. // Lives on the UI thread. The NetworkContext this owns is intended for requests // not associated with a profile. It stores no data on disk, and has no HTTP @@ -105,27 +95,6 @@ public: // Destroys the global SystemNetworkContextManager instance. static void DeleteInstance(); - // If the network service is disabled, |network_context_request| will be for - // the NetworkContext used by the SystemNetworkContextManager and - // |network_context_params| as needed to set up a system NetworkContext. - // Otherwise, this method can still be used to help set up the IOThread's - // in-process URLRequestContext. - // - // Must be called before the system NetworkContext is first used. - // - // |stub_resolver_enabled|, |dns_over_https_servers|, - // |http_auth_static_params|, |http_auth_dynamic_params|, and - // |is_quic_allowed| are used to pass initial NetworkService state to the - // caller, so the NetworkService can be configured appropriately. Using - // NetworkService's Mojo interface to set those options would lead to races - // with other UI->IO thread network-related tasks, since Mojo doesn't preserve - // execution order relative to PostTasks. - void SetUp(network::mojom::NetworkContextRequest *network_context_request, - network::mojom::NetworkContextParamsPtr *network_context_params, bool *stub_resolver_enabled, - base::Optional<std::vector<network::mojom::DnsOverHttpsServerPtr>> *dns_over_https_servers, - network::mojom::HttpAuthStaticParamsPtr *http_auth_static_params, - network::mojom::HttpAuthDynamicParamsPtr *http_auth_dynamic_params, bool *is_quic_allowed); - // Returns the System NetworkContext. May only be called after SetUp(). Does // any initialization of the NetworkService that may be needed when first // called. @@ -151,8 +120,8 @@ public: // SSL configuration updates. void AddSSLConfigToNetworkContextParams(network::mojom::NetworkContextParams *network_context_params); - // Returns default set of parameters for configuring the network service. - network::mojom::NetworkContextParamsPtr CreateDefaultNetworkContextParams(); + // Configures the default set of parameters for the network context. + void ConfigureDefaultNetworkContextParams(network::mojom::NetworkContextParams *); private: class URLLoaderFactoryForSystem; @@ -167,17 +136,12 @@ private: // NetworkContext using the network service, if the network service is // enabled. nullptr, otherwise. - network::mojom::NetworkContextPtr network_service_network_context_; - - // This is a NetworkContext that wraps the IOThread's SystemURLRequestContext. - // Always initialized in SetUp, but it's only returned by Context() when the - // network service is disabled. - network::mojom::NetworkContextPtr io_thread_network_context_; + mojo::Remote<network::mojom::NetworkContext> network_service_network_context_; // URLLoaderFactory backed by the NetworkContext returned by GetContext(), so // consumers don't all need to create their own factory. scoped_refptr<URLLoaderFactoryForSystem> shared_url_loader_factory_; - network::mojom::URLLoaderFactoryPtr url_loader_factory_; + mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory_; ProxyConfigMonitor proxy_config_monitor_; |