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

Side by Side Diff: net/base/multi_threaded_cert_verifier.h

Issue 10854063: Clean-up inline members of nested classes (net/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a NET_EXPOR_PRIVATE Created 8 years, 4 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
« no previous file with comments | « no previous file | net/base/multi_threaded_cert_verifier.cc » ('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 #ifndef NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ 5 #ifndef NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_
6 #define NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ 6 #define NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 friend class CertVerifierJob; 58 friend class CertVerifierJob;
59 friend class MultiThreadedCertVerifierTest; 59 friend class MultiThreadedCertVerifierTest;
60 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, CacheHit); 60 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, CacheHit);
61 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, DifferentCACerts); 61 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, DifferentCACerts);
62 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, InflightJoin); 62 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, InflightJoin);
63 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, CancelRequest); 63 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, CancelRequest);
64 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest, 64 FRIEND_TEST_ALL_PREFIXES(MultiThreadedCertVerifierTest,
65 RequestParamsComparators); 65 RequestParamsComparators);
66 66
67 // Input parameters of a certificate verification request. 67 // Input parameters of a certificate verification request.
68 struct RequestParams { 68 struct NET_EXPORT_PRIVATE RequestParams {
69 RequestParams(const SHA1Fingerprint& cert_fingerprint_arg, 69 RequestParams(const SHA1Fingerprint& cert_fingerprint_arg,
70 const SHA1Fingerprint& ca_fingerprint_arg, 70 const SHA1Fingerprint& ca_fingerprint_arg,
71 const std::string& hostname_arg, 71 const std::string& hostname_arg,
72 int flags_arg) 72 int flags_arg);
73 : cert_fingerprint(cert_fingerprint_arg),
74 ca_fingerprint(ca_fingerprint_arg),
75 hostname(hostname_arg),
76 flags(flags_arg) {}
77 73
78 bool operator<(const RequestParams& other) const { 74 bool operator<(const RequestParams& other) const {
79 // |flags| is compared before |cert_fingerprint|, |ca_fingerprint|, and 75 // |flags| is compared before |cert_fingerprint|, |ca_fingerprint|, and
80 // |hostname| under assumption that integer comparisons are faster than 76 // |hostname| under assumption that integer comparisons are faster than
81 // memory and string comparisons. 77 // memory and string comparisons.
82 if (flags != other.flags) 78 if (flags != other.flags)
83 return flags < other.flags; 79 return flags < other.flags;
84 int rv = memcmp(cert_fingerprint.data, other.cert_fingerprint.data, 80 int rv = memcmp(cert_fingerprint.data, other.cert_fingerprint.data,
85 sizeof(cert_fingerprint.data)); 81 sizeof(cert_fingerprint.data));
86 if (rv != 0) 82 if (rv != 0)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 uint64 inflight_joins_; 157 uint64 inflight_joins_;
162 158
163 scoped_refptr<CertVerifyProc> verify_proc_; 159 scoped_refptr<CertVerifyProc> verify_proc_;
164 160
165 DISALLOW_COPY_AND_ASSIGN(MultiThreadedCertVerifier); 161 DISALLOW_COPY_AND_ASSIGN(MultiThreadedCertVerifier);
166 }; 162 };
167 163
168 } // namespace net 164 } // namespace net
169 165
170 #endif // NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ 166 #endif // NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/multi_threaded_cert_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698