| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 break; | 100 break; |
| 101 default: | 101 default: |
| 102 // Other motivations should never happen here. | 102 // Other motivations should never happen here. |
| 103 NOTREACHED(); | 103 NOTREACHED(); |
| 104 break; | 104 break; |
| 105 } | 105 } |
| 106 | 106 |
| 107 // Setup the SSL Configuration. | 107 // Setup the SSL Configuration. |
| 108 net::SSLConfig ssl_config; | 108 net::SSLConfig ssl_config; |
| 109 session->ssl_config_service()->GetSSLConfig(&ssl_config); | 109 session->ssl_config_service()->GetSSLConfig(&ssl_config); |
| 110 if (session->http_stream_factory()->has_next_protos()) | 110 session->GetNextProtos(&ssl_config.next_protos); |
| 111 ssl_config.next_protos = session->http_stream_factory()->next_protos(); | |
| 112 | 111 |
| 113 // All preconnects should perform EV certificate verification. | 112 // All preconnects should perform EV certificate verification. |
| 114 ssl_config.verify_ev_cert = true; | 113 ssl_config.verify_ev_cert = true; |
| 115 | 114 |
| 116 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); | 115 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); |
| 117 http_stream_factory->PreconnectStreams(count, request_info, priority, | 116 http_stream_factory->PreconnectStreams(count, request_info, priority, |
| 118 ssl_config, ssl_config); | 117 ssl_config, ssl_config); |
| 119 } | 118 } |
| 120 | 119 |
| 121 } // namespace chrome_browser_net | 120 } // namespace chrome_browser_net |
| OLD | NEW |