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

Side by Side Diff: chrome/browser/net/preconnect.cc

Issue 8156001: net: rework the NPN patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 break; 87 break;
88 default: 88 default:
89 // Other motivations should never happen here. 89 // Other motivations should never happen here.
90 NOTREACHED(); 90 NOTREACHED();
91 break; 91 break;
92 } 92 }
93 93
94 // Setup the SSL Configuration. 94 // Setup the SSL Configuration.
95 net::SSLConfig ssl_config; 95 net::SSLConfig ssl_config;
96 session->ssl_config_service()->GetSSLConfig(&ssl_config); 96 session->ssl_config_service()->GetSSLConfig(&ssl_config);
97 if (session->http_stream_factory()->next_protos()) 97 if (session->http_stream_factory()->has_next_protos())
98 ssl_config.next_protos = *session->http_stream_factory()->next_protos(); 98 ssl_config.next_protos = session->http_stream_factory()->next_protos();
99 99
100 // All preconnects should perform EV certificate verification. 100 // All preconnects should perform EV certificate verification.
101 ssl_config.verify_ev_cert = true; 101 ssl_config.verify_ev_cert = true;
102 102
103 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory(); 103 net::HttpStreamFactory* http_stream_factory = session->http_stream_factory();
104 http_stream_factory->PreconnectStreams( 104 http_stream_factory->PreconnectStreams(
105 count, request_info, ssl_config, ssl_config, net::BoundNetLog()); 105 count, request_info, ssl_config, ssl_config, net::BoundNetLog());
106 } 106 }
107 107
108 } // namespace chrome_browser_net 108 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | chrome/browser/ui/webui/net_internals_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698