| 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" |
| 11 #include "net/base/net_log.h" | 11 #include "net/base/net_log.h" |
| 12 #include "net/base/ssl_config_service.h" | |
| 13 #include "net/http/http_network_session.h" | 12 #include "net/http/http_network_session.h" |
| 14 #include "net/http/http_request_info.h" | 13 #include "net/http/http_request_info.h" |
| 15 #include "net/http/http_stream_factory.h" | 14 #include "net/http/http_stream_factory.h" |
| 16 #include "net/http/http_transaction_factory.h" | 15 #include "net/http/http_transaction_factory.h" |
| 16 #include "net/ssl/ssl_config_service.h" |
| 17 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
| 18 #include "net/url_request/url_request_context_getter.h" | 18 #include "net/url_request/url_request_context_getter.h" |
| 19 | 19 |
| 20 using content::BrowserThread; | 20 using content::BrowserThread; |
| 21 | 21 |
| 22 namespace chrome_browser_net { | 22 namespace chrome_browser_net { |
| 23 | 23 |
| 24 void PreconnectOnUIThread( | 24 void PreconnectOnUIThread( |
| 25 const GURL& url, | 25 const GURL& url, |
| 26 UrlInfo::ResolutionMotivation motivation, | 26 UrlInfo::ResolutionMotivation motivation, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // All preconnects should perform EV certificate verification. | 101 // All preconnects should perform EV certificate verification. |
| 102 ssl_config.verify_ev_cert = true; | 102 ssl_config.verify_ev_cert = true; |
| 103 | 103 |
| 104 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); | 104 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); |
| 105 http_stream_factory->PreconnectStreams(count, request_info, ssl_config, | 105 http_stream_factory->PreconnectStreams(count, request_info, ssl_config, |
| 106 ssl_config); | 106 ssl_config); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace chrome_browser_net | 109 } // namespace chrome_browser_net |
| OLD | NEW |