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

Side by Side Diff: net/socket/ssl_client_socket.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "crypto/ec_private_key.h" 10 #include "crypto/ec_private_key.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return false; 174 return false;
175 if (!channel_id_service) { 175 if (!channel_id_service) {
176 DVLOG(1) << "NULL channel_id_service_, not enabling channel ID."; 176 DVLOG(1) << "NULL channel_id_service_, not enabling channel ID.";
177 return false; 177 return false;
178 } 178 }
179 return true; 179 return true;
180 } 180 }
181 181
182 // static 182 // static
183 bool SSLClientSocket::HasCipherAdequateForHTTP2( 183 bool SSLClientSocket::HasCipherAdequateForHTTP2(
184 const std::vector<uint16>& cipher_suites) { 184 const std::vector<uint16_t>& cipher_suites) {
185 for (uint16 cipher : cipher_suites) { 185 for (uint16_t cipher : cipher_suites) {
186 if (IsTLSCipherSuiteAllowedByHTTP2(cipher)) 186 if (IsTLSCipherSuiteAllowedByHTTP2(cipher))
187 return true; 187 return true;
188 } 188 }
189 return false; 189 return false;
190 } 190 }
191 191
192 // static 192 // static
193 bool SSLClientSocket::IsTLSVersionAdequateForHTTP2( 193 bool SSLClientSocket::IsTLSVersionAdequateForHTTP2(
194 const SSLConfig& ssl_config) { 194 const SSLConfig& ssl_config) {
195 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1_2; 195 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1_2;
(...skipping 16 matching lines...) Expand all
212 wire_protos.push_back(proto.size()); 212 wire_protos.push_back(proto.size());
213 for (const char ch : proto) { 213 for (const char ch : proto) {
214 wire_protos.push_back(static_cast<uint8_t>(ch)); 214 wire_protos.push_back(static_cast<uint8_t>(ch));
215 } 215 }
216 } 216 }
217 217
218 return wire_protos; 218 return wire_protos;
219 } 219 }
220 220
221 } // namespace net 221 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698