Chromium Code Reviews| Index: components/ssl_errors/error_classification.cc |
| diff --git a/components/ssl_errors/error_classification.cc b/components/ssl_errors/error_classification.cc |
| index c61b3262aca91ceeb9df8e5f83ba5a1fa6e209a4..7498ac728fc88311f1366a19d15006f6f6402a86 100644 |
| --- a/components/ssl_errors/error_classification.cc |
| +++ b/components/ssl_errors/error_classification.cc |
| @@ -279,12 +279,10 @@ void SetBuildTimeForTesting(const base::Time& testing_time) { |
| } |
| bool IsHostNameKnownTLD(const std::string& host_name) { |
|
Peter Kasting
2016/10/22 05:04:18
Nit: Bad form to ask you to change this while here
brettw
2016/10/24 21:45:23
Seems like a good improvement, done.
|
| - size_t tld_length = net::registry_controlled_domains::GetRegistryLength( |
| - host_name, net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
| + return net::registry_controlled_domains::HostHasRegistryControlledDomain( |
| + host_name, |
| + net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, |
| net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); |
| - if (tld_length == 0 || tld_length == std::string::npos) |
| - return false; |
| - return true; |
| } |
| HostnameTokens Tokenize(const std::string& name) { |