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 c37ce2e007b820ec55483a50b8fd7de5bda821ad..f05b62f91849c9ce2dfccd043006eea96d4cafb5 100644 |
| --- a/chrome/browser/ssl/ssl_error_classification.h |
| +++ b/chrome/browser/ssl/ssl_error_classification.h |
| @@ -1,22 +1,27 @@ |
| -// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
| #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
| +#include <string> |
| + |
| #include "base/time/time.h" |
| #include "net/cert/x509_certificate.h" |
| +#include "url/gurl.h" |
| // This class calculates the severity scores for the different type of SSL |
| // errors. |
| +// Note - commented functions still need to be impelemented. |
| class SSLErrorClassification { |
| public: |
| SSLErrorClassification(base::Time current_time, |
| - const net::X509Certificate& cert); |
| + const::GURL& url, |
| + const::net::X509Certificate& cert); |
| ~SSLErrorClassification(); |
| - // This method checks whether the user clock is in the past or not. |
| + // This method checks whether the system time is in the past. |
| static bool IsUserClockInThePast(base::Time time_now); |
| // This method checks whether the system time is too far in the future or |
| @@ -27,17 +32,38 @@ class SSLErrorClassification { |
| // CERT_DATE_INVALID. |
| float InvalidDateSeverityScore() const; |
| + // A method which calculates the severity score when the ssl error is |
| + // CERT_COMMON_NAME_INVALID. |
| + float InvalidCommonNameSeverityScore() const; |
| + |
| + // A method which calculates the severity score when the |
| + // ssl error is CERT_AUTHORITY_INVALID. |
| + // float InvalidAuthoritySeverityScore(); |
|
felt
2014/07/15 00:52:44
Please don't include commented-out methods here, j
radhikabhar
2014/07/15 17:34:09
Done.
|
| + |
| static void RecordUMAStatistics(bool overridable); |
| base::TimeDelta TimePassedSinceExpiry() const; |
| private: |
| FRIEND_TEST_ALL_PREFIXES(SSLErrorClassification, TestDateInvalidScore); |
| + FRIEND_TEST_ALL_PREFIXES(SSLErrorClassification, TestNameMismatch); |
| + |
| + bool IsWWWDifference() const; |
|
felt
2014/07/15 00:52:44
Can you either give these more descriptive names o
radhikabhar
2014/07/15 17:34:09
Done.
|
| + bool IsRegisteredDomainMatch() const; |
| + bool IsRegisteredDomainInverseMatch() const; |
| + bool IsHostNameTooBroad() const; |
| + // bool IsCDNError(); |
| + bool IsSelfSigned() const; |
| + // bool IsIntermediateCertificateIssues(); |
| + float CalculateScoreCheckEnvironment() const; |
| + // float CalculateScoreCheckWebsiteSettings(): |
| float CalculateScoreTimePassedSinceExpiry() const; |
| // This stores the current time. |
| base::Time current_time_; |
| + const GURL request_url_; |
| + |
| // This stores the certificate. |
| const net::X509Certificate& cert_; |
| }; |