Chromium Code Reviews| Index: chrome/browser/ssl/ssl_error_classification.h |
| diff --git a/chrome/browser/ssl/ssl_error_classification.h b/chrome/browser/ssl/ssl_error_classification.h |
| index 2eda135dfb616681c3a8c77120c7eee52067e927..58a7a02ef33e505885b04bcb100102e8d4e0c91a 100644 |
| --- a/chrome/browser/ssl/ssl_error_classification.h |
| +++ b/chrome/browser/ssl/ssl_error_classification.h |
| @@ -72,6 +72,18 @@ class SSLErrorClassification : public content::NotificationObserver { |
| void RecordCaptivePortalUMAStatistics(bool overridable) const; |
| base::TimeDelta TimePassedSinceExpiry() const; |
| + // Returns true if the site's hostname differs from one of the DNS |
| + // names in the certificate (CN or SANs) only by the presence or |
| + // absence of the single-label prefix "www". E.g.: |
| + // |
| + // www.example.com ~ example.com -> true |
|
meacer
2015/07/09 17:58:56
I understand this isn't your comment, but can you
Bhanu Dev
2015/07/11 04:00:43
Done.
|
| + // example.com ~ www.example.com -> true |
| + // www.food.example.com ~ example.com -> false |
| + // mail.example.com ~ example.com -> false |
| + static bool GetWWWSubDomainMatch(const std::string& host_name, |
| + const std::vector<std::string>& dns_names, |
| + std::string* www_match_host_name); |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestDateInvalidScore); |
| FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestNameMismatch); |
| @@ -83,14 +95,7 @@ class SSLErrorClassification : public content::NotificationObserver { |
| // Returns true if the hostname has a known Top Level Domain. |
| static bool IsHostNameKnownTLD(const std::string& host_name); |
| - // Returns true if the site's hostname differs from one of the DNS |
| - // names in the certificate (CN or SANs) only by the presence or |
| - // absence of the single-label prefix "www". E.g.: |
| - // |
| - // www.example.com ~ example.com -> true |
| - // example.com ~ www.example.com -> true |
| - // www.food.example.com ~ example.com -> false |
| - // mail.example.com ~ example.com -> false |
| + // Returns true if GetWWWSubDomainMatch finds a www mismatch. |
| bool IsWWWSubDomainMatch() const; |
| // Returns true if |child| is a subdomain of any of the |potential_parents|. |