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

Unified Diff: net/base/x509_cert_types.h

Issue 2815048: Minor clean-up tasks that were TODO(snej) (Closed)
Patch Set: Rebase on trunk prior to landing Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/ev_root_ca_metadata.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_cert_types.h
diff --git a/net/base/x509_cert_types.h b/net/base/x509_cert_types.h
index cf23f58be27d21f0c5639558d227d4fc293de51c..0f5122eb43790e10ee21e666e8f0f262345674d5 100644
--- a/net/base/x509_cert_types.h
+++ b/net/base/x509_cert_types.h
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_BASE_X509_TYPES_H_
-#define NET_BASE_X509_TYPES_H_
+#ifndef NET_BASE_X509_CERT_TYPES_H_
+#define NET_BASE_X509_CERT_TYPES_H_
#include <string.h>
+#include <functional>
#include <iostream>
#include <map>
#include <set>
@@ -44,7 +45,10 @@ struct SHA1Fingerprint {
class SHA1FingerprintLessThan
: public std::binary_function<SHA1Fingerprint, SHA1Fingerprint, bool> {
public:
- bool operator() (const SHA1Fingerprint& lhs, const SHA1Fingerprint& rhs) const;
+ bool operator() (const SHA1Fingerprint& lhs,
+ const SHA1Fingerprint& rhs) const {
+ return memcmp(lhs.data, rhs.data, sizeof(lhs.data)) < 0;
+ }
};
// CertPrincipal represents the issuer or subject field of an X.509 certificate.
@@ -130,4 +134,4 @@ inline bool CSSMOIDEqual(const CSSM_OID* oid1, const CSSM_OID* oid2) {
} // namespace net
-#endif // NET_BASE_X509_TYPES_H_
+#endif // NET_BASE_X509_CERT_TYPES_H_
« no previous file with comments | « net/base/ev_root_ca_metadata.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698