OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 "ios/web/net/cert_host_pair.h" |
| 6 |
| 7 #include "net/cert/x509_certificate.h" |
| 8 |
| 9 namespace web { |
| 10 |
| 11 CertHostPair::CertHostPair(const scoped_refptr<net::X509Certificate>& cert, |
| 12 const std::string& host) |
| 13 : cert(cert), host(host) {} |
| 14 |
| 15 CertHostPair::~CertHostPair() {} |
| 16 |
| 17 bool CertHostPair::operator<(const CertHostPair& other) const { |
| 18 if (host != other.host) |
| 19 return host < other.host; |
| 20 return net::X509Certificate::LessThan()(cert, other.cert); |
| 21 } |
| 22 |
| 23 } // web |
OLD | NEW |