OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "components/ssl_errors/error_classification.h" | 5 #include "components/ssl_errors/error_classification.h" |
6 | 6 |
| 7 #include <limits.h> |
7 #include <stddef.h> | 8 #include <stddef.h> |
8 | 9 |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/build_time.h" | 12 #include "base/build_time.h" |
12 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
13 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
14 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 return std::find(dns_names_domain.begin(), dns_names_domain.end() - 1, | 416 return std::find(dns_names_domain.begin(), dns_names_domain.end() - 1, |
416 host_name_domain) != dns_names_domain.end() - 1; | 417 host_name_domain) != dns_names_domain.end() - 1; |
417 } | 418 } |
418 | 419 |
419 bool IsHostnameNonUniqueOrDotless(const std::string& hostname) { | 420 bool IsHostnameNonUniqueOrDotless(const std::string& hostname) { |
420 return net::IsHostnameNonUnique(hostname) || | 421 return net::IsHostnameNonUnique(hostname) || |
421 hostname.find('.') == std::string::npos; | 422 hostname.find('.') == std::string::npos; |
422 } | 423 } |
423 | 424 |
424 } // namespace ssl_errors | 425 } // namespace ssl_errors |
OLD | NEW |