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

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

Issue 2939433004: Move common main URLRequestContext setup code to ProfileIOData (Closed)
Patch Set: Fix Created 3 years, 6 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 895fa558d4d2d4c1a1af4a38c444330d771452ed..05c75992690fc7fd5e687b0660e5ea631c4597e1 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -77,15 +77,12 @@ class CertVerifier;
class ChannelIDService;
class ClientCertStore;
class CookieStore;
-class CTVerifier;
class HttpTransactionFactory;
class ProxyConfigService;
-class ProxyService;
class ReportingService;
class ReportSender;
class SSLConfigService;
class TransportSecurityPersister;
-class TransportSecurityState;
class URLRequestContextStorage;
class URLRequestJobFactoryImpl;
} // namespace net
@@ -184,10 +181,6 @@ class ProfileIOData {
return &network_controller_handle_;
}
- net::TransportSecurityState* transport_security_state() const {
- return transport_security_state_.get();
- }
-
#if defined(OS_CHROMEOS)
std::string username_hash() const {
return username_hash_;
@@ -380,10 +373,6 @@ class ProfileIOData {
void set_previews_io_data(
std::unique_ptr<previews::PreviewsIOData> previews_io_data) const;
- net::ProxyService* proxy_service() const {
- return proxy_service_.get();
- }
-
net::URLRequestContext* main_request_context() const {
return main_request_context_.get();
}
@@ -559,10 +548,6 @@ class ProfileIOData {
mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData>
data_reduction_proxy_io_data_;
- mutable std::unique_ptr<net::ProxyService> proxy_service_;
- mutable std::unique_ptr<net::TransportSecurityState>
- transport_security_state_;
- mutable std::unique_ptr<net::CTVerifier> cert_transparency_verifier_;
mutable std::unique_ptr<ChromeExpectCTReporter> expect_ct_reporter_;
#if defined(OS_CHROMEOS)
// Set to |cert_verifier_| if it references a PolicyCertVerifier. In that
@@ -574,13 +559,6 @@ class ProfileIOData {
mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_;
#endif
- // Pointed to by the TransportSecurityState.
- mutable std::unique_ptr<net::TransportSecurityPersister>
- transport_security_persister_;
- mutable std::unique_ptr<net::ReportSender> certificate_report_sender_;
- mutable std::unique_ptr<certificate_transparency::CTPolicyManager>
- ct_policy_manager_;
-
// Owns the subset of URLRequestContext's elements that are created by
// subclasses of ProfileImplIOData, to ensure proper destruction ordering.
// TODO(mmenke): Move ownship of net objects owned by the ProfileIOData
@@ -589,6 +567,15 @@ class ProfileIOData {
main_request_context_storage_;
mutable std::unique_ptr<net::URLRequestContext> main_request_context_;
+ // Pointed to by the TransportSecurityState (owned by
+ // URLRequestContextStorage), and must be disconnected from it before it's
+ // destroyed.
+ mutable std::unique_ptr<net::TransportSecurityPersister>
+ transport_security_persister_;
+ mutable std::unique_ptr<net::ReportSender> certificate_report_sender_;
+ mutable std::unique_ptr<certificate_transparency::CTPolicyManager>
+ ct_policy_manager_;
+
mutable std::unique_ptr<net::URLRequestContext> extensions_request_context_;
// One URLRequestContext per isolated app for main and media requests.
mutable URLRequestContextMap app_request_context_map_;

Powered by Google App Engine
This is Rietveld 408576698