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 <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/build_time.h" | 12 #include "base/build_time.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "components/ssl_errors/error_info.h" | 19 #include "components/ssl_errors/error_info.h" |
20 #include "components/url_formatter/url_formatter.h" | 20 #include "components/url_formatter/url_formatter.h" |
21 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
22 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
23 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 23 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 24 #include "net/base/url_util.h" |
24 #include "net/cert/x509_cert_types.h" | 25 #include "net/cert/x509_cert_types.h" |
25 #include "net/cert/x509_certificate.h" | 26 #include "net/cert/x509_certificate.h" |
26 #include "url/gurl.h" | 27 #include "url/gurl.h" |
27 | 28 |
28 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
29 #include "base/win/win_util.h" | 30 #include "base/win/win_util.h" |
30 #include "base/win/windows_version.h" | 31 #include "base/win/windows_version.h" |
31 #endif | 32 #endif |
32 | 33 |
33 using base::Time; | 34 using base::Time; |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 return std::find(dns_names_domain.begin(), dns_names_domain.end() - 1, | 417 return std::find(dns_names_domain.begin(), dns_names_domain.end() - 1, |
417 host_name_domain) != dns_names_domain.end() - 1; | 418 host_name_domain) != dns_names_domain.end() - 1; |
418 } | 419 } |
419 | 420 |
420 bool IsHostnameNonUniqueOrDotless(const std::string& hostname) { | 421 bool IsHostnameNonUniqueOrDotless(const std::string& hostname) { |
421 return net::IsHostnameNonUnique(hostname) || | 422 return net::IsHostnameNonUnique(hostname) || |
422 hostname.find('.') == std::string::npos; | 423 hostname.find('.') == std::string::npos; |
423 } | 424 } |
424 | 425 |
425 } // namespace ssl_errors | 426 } // namespace ssl_errors |
OLD | NEW |