| 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 4b2937b7b97303a1c2a56c29d905f22fa6df0220..d966cf97cd0de67116de0fe50106bf15b88fc9b3 100644
|
| --- a/chrome/browser/profiles/profile_io_data.h
|
| +++ b/chrome/browser/profiles/profile_io_data.h
|
| @@ -28,6 +28,7 @@
|
| #include "net/http/http_cache.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/url_request/url_request_context.h"
|
| +#include "net/url_request/url_request_context_builder.h"
|
| #include "net/url_request/url_request_interceptor.h"
|
| #include "net/url_request/url_request_job_factory.h"
|
|
|
| @@ -70,6 +71,7 @@ class ProxyService;
|
| class SSLConfigService;
|
| class TransportSecurityPersister;
|
| class TransportSecurityState;
|
| +class URLRequestContextBuilder;
|
| class URLRequestJobFactoryImpl;
|
| } // namespace net
|
|
|
| @@ -174,9 +176,7 @@ class ProfileIOData {
|
| return network_controller_.get();
|
| }
|
|
|
| - net::TransportSecurityState* transport_security_state() const {
|
| - return transport_security_state_.get();
|
| - }
|
| + net::TransportSecurityState* transport_security_state() const;
|
|
|
| #if defined(OS_CHROMEOS)
|
| std::string username_hash() const {
|
| @@ -318,12 +318,49 @@ class ProfileIOData {
|
| void* profile;
|
| };
|
|
|
| + // Declared here to allow access to ProfileParams.
|
| + class HttpTransactionFactoryDelegate
|
| + : public net::HttpTransactionFactoryFactory {
|
| + public:
|
| + HttpTransactionFactoryDelegate(const ProfileIOData* owner,
|
| + const ProfileParams* profile_params,
|
| + net::HttpCache::BackendFactory* main_backend)
|
| + : owner_(owner),
|
| + profile_params_(profile_params),
|
| + main_backend_(main_backend) {}
|
| +
|
| + net::HttpTransactionFactory* Create(
|
| + net::URLRequestContext* context) override;
|
| +
|
| + private:
|
| + const ProfileIOData* owner_;
|
| + const ProfileParams* profile_params_;
|
| + net::HttpCache::BackendFactory* main_backend_;
|
| + };
|
| +
|
| + // Declared here to allow access to protected functions.
|
| + class CertVerifierDelegateMainContext : public net::CertVerifierDelegate {
|
| + public:
|
| + CertVerifierDelegateMainContext(const ProfileIOData* owner)
|
| + : owner_(owner) {}
|
| +
|
| + net::CertVerifier* Get(net::URLRequestContext* context) override;
|
| +
|
| + private:
|
| + const ProfileIOData* owner_;
|
| + };
|
| +
|
| + net::CertVerifier* GetCertVerifierForMainContext(
|
| + net::URLRequestContext* context) const;
|
| +
|
| explicit ProfileIOData(Profile::ProfileType profile_type);
|
|
|
| static std::string GetSSLSessionCacheShard();
|
|
|
| void InitializeOnUIThread(Profile* profile);
|
| void ApplyProfileParamsToContext(net::URLRequestContext* context) const;
|
| + void ApplyProfileParamsToContext(
|
| + net::URLRequestContextBuilder* context_builder) const;
|
|
|
| scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults(
|
| scoped_ptr<net::URLRequestJobFactoryImpl> job_factory,
|
| @@ -342,20 +379,11 @@ class ProfileIOData {
|
| void ShutdownOnUIThread(
|
| scoped_ptr<ChromeURLRequestContextGetterVector> context_getters);
|
|
|
| - // A ChannelIDService object is created by a derived class of
|
| - // ProfileIOData, and the derived class calls this method to set the
|
| - // channel_id_service_ member and transfers ownership to the base
|
| - // class.
|
| - void set_channel_id_service(
|
| - net::ChannelIDService* channel_id_service) const;
|
| -
|
| void set_data_reduction_proxy_io_data(
|
| scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
|
| data_reduction_proxy_io_data) const;
|
|
|
| - net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const {
|
| - return fraudulent_certificate_reporter_.get();
|
| - }
|
| + net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const;
|
|
|
| net::ProxyService* proxy_service() const {
|
| return proxy_service_.get();
|
| @@ -382,7 +410,8 @@ class ProfileIOData {
|
| // Creates network session and main network transaction factory.
|
| scoped_ptr<net::HttpCache> CreateMainHttpFactory(
|
| const ProfileParams* profile_params,
|
| - net::HttpCache::BackendFactory* main_backend) const;
|
| + net::HttpCache::BackendFactory* main_backend,
|
| + net::URLRequestContext* context) const;
|
|
|
| // Creates network transaction factory.
|
| scoped_ptr<net::HttpCache> CreateHttpFactory(
|
| @@ -434,8 +463,8 @@ class ProfileIOData {
|
| scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate,
|
| ProfileParams* profile_params,
|
| content::ProtocolHandlerMap* protocol_handlers,
|
| - content::URLRequestInterceptorScopedVector
|
| - request_interceptors) const = 0;
|
| + content::URLRequestInterceptorScopedVector request_interceptors,
|
| + net::URLRequestContextBuilder* context_builder) const = 0;
|
|
|
| // Initializes the RequestContext for extensions.
|
| virtual void InitializeExtensionsRequestContext(
|
| @@ -474,6 +503,9 @@ class ProfileIOData {
|
| net::URLRequestContext* app_context,
|
| const StoragePartitionDescriptor& partition_descriptor) const = 0;
|
|
|
| + virtual void InitPostContextSetup(
|
| + ChromeNetworkDelegate* chrome_network_delegate) const {}
|
| +
|
| // The order *DOES* matter for the majority of these member variables, so
|
| // don't move them around unless you know what you're doing!
|
| // General rules:
|
| @@ -535,7 +567,6 @@ class ProfileIOData {
|
| #if defined(ENABLE_EXTENSIONS)
|
| mutable scoped_refptr<extensions::InfoMap> extension_info_map_;
|
| #endif
|
| - mutable scoped_ptr<net::ChannelIDService> channel_id_service_;
|
|
|
| mutable scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
|
| data_reduction_proxy_io_data_;
|
| @@ -543,7 +574,6 @@ class ProfileIOData {
|
| mutable scoped_ptr<net::FraudulentCertificateReporter>
|
| fraudulent_certificate_reporter_;
|
| mutable scoped_ptr<net::ProxyService> proxy_service_;
|
| - mutable scoped_ptr<net::TransportSecurityState> transport_security_state_;
|
| mutable scoped_ptr<net::HttpServerProperties>
|
| http_server_properties_;
|
| #if defined(OS_CHROMEOS)
|
|
|