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

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

Issue 5574006: Start deinlining non-empty virtual methods. (This will be automatically checked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove virtual from VideoFrame::type() Created 10 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/socket/ssl_client_socket.h"
6
7 namespace net {
8
9 SSLClientSocket::SSLClientSocket()
10 : was_npn_negotiated_(false),
11 was_spdy_negotiated_(false) {
12 }
13
14 SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString(
15 const std::string& proto_string) {
16 if (proto_string == "http1.1" || proto_string == "http/1.1") {
17 return kProtoHTTP11;
18 } else if (proto_string == "spdy/1") {
19 return kProtoSPDY1;
20 } else if (proto_string == "spdy/2") {
21 return kProtoSPDY2;
22 } else {
23 return kProtoUnknown;
24 }
25 }
26
27 bool SSLClientSocket::IgnoreCertError(int error, int load_flags) {
28 if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS)
29 return true;
30
31 if (error == ERR_CERT_COMMON_NAME_INVALID &&
32 (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID))
33 return true;
34
35 if (error == ERR_CERT_DATE_INVALID &&
36 (load_flags & LOAD_IGNORE_CERT_DATE_INVALID))
37 return true;
38
39 if (error == ERR_CERT_AUTHORITY_INVALID &&
40 (load_flags & LOAD_IGNORE_CERT_AUTHORITY_INVALID))
41 return true;
42
43 return false;
44 }
45
46 bool SSLClientSocket::was_npn_negotiated() const {
47 return was_npn_negotiated_;
48 }
49
50 bool SSLClientSocket::set_was_npn_negotiated(bool negotiated) {
51 return was_npn_negotiated_ = negotiated;
52 }
53
54 bool SSLClientSocket::was_spdy_negotiated() const {
55 return was_spdy_negotiated_;
56 }
57
58 bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) {
59 return was_spdy_negotiated_ = negotiated;
60 }
61
62 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698