OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/net/preconnect.h" | 5 #include "chrome/browser/net/preconnect.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 NOTREACHED(); | 93 NOTREACHED(); |
94 break; | 94 break; |
95 } | 95 } |
96 | 96 |
97 // Setup the SSL Configuration. | 97 // Setup the SSL Configuration. |
98 ssl_config_.reset(new net::SSLConfig()); | 98 ssl_config_.reset(new net::SSLConfig()); |
99 session->ssl_config_service()->GetSSLConfig(ssl_config_.get()); | 99 session->ssl_config_service()->GetSSLConfig(ssl_config_.get()); |
100 if (session->http_stream_factory()->next_protos()) | 100 if (session->http_stream_factory()->next_protos()) |
101 ssl_config_->next_protos = *session->http_stream_factory()->next_protos(); | 101 ssl_config_->next_protos = *session->http_stream_factory()->next_protos(); |
102 | 102 |
103 // All preconnects should be for main pages. | 103 // All preconnects should perform EV certificate verification. |
104 ssl_config_->verify_ev_cert = true; | 104 ssl_config_->verify_ev_cert = true; |
105 | 105 |
106 proxy_info_.reset(new net::ProxyInfo()); | 106 proxy_info_.reset(new net::ProxyInfo()); |
107 net::StreamFactory* stream_factory = session->http_stream_factory(); | 107 net::StreamFactory* stream_factory = session->http_stream_factory(); |
108 stream_request_.reset( | 108 stream_request_.reset( |
109 stream_factory->RequestStream(request_info_.get(), ssl_config_.get(), | 109 stream_factory->RequestStream(request_info_.get(), ssl_config_.get(), |
110 proxy_info_.get(), session, this, | 110 proxy_info_.get(), session, this, |
111 net_log_)); | 111 net_log_)); |
112 } | 112 } |
113 | 113 |
(...skipping 13 matching lines...) Expand all Loading... |
127 void Preconnect::OnNeedsProxyAuth(const net::HttpResponseInfo& proxy_response, | 127 void Preconnect::OnNeedsProxyAuth(const net::HttpResponseInfo& proxy_response, |
128 net::HttpAuthController* auth_controller) { | 128 net::HttpAuthController* auth_controller) { |
129 delete this; | 129 delete this; |
130 } | 130 } |
131 | 131 |
132 void Preconnect::OnNeedsClientAuth(net::SSLCertRequestInfo* cert_info) { | 132 void Preconnect::OnNeedsClientAuth(net::SSLCertRequestInfo* cert_info) { |
133 delete this; | 133 delete this; |
134 } | 134 } |
135 | 135 |
136 } // chrome_browser_net | 136 } // chrome_browser_net |
OLD | NEW |