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..bf7a76c25038e748f205e7b2de0bf67fd995e427 100644 |
--- a/chrome/browser/ssl/ssl_error_classification.h |
+++ b/chrome/browser/ssl/ssl_error_classification.h |
@@ -6,17 +6,24 @@ |
#define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
#include "base/time/time.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "net/cert/x509_certificate.h" |
+namespace content { |
+class WebContents; |
+} |
+ |
// This class calculates the severity scores for the different type of SSL |
// errors. |
-class SSLErrorClassification { |
+class SSLErrorClassification : public content::NotificationObserver { |
public: |
- SSLErrorClassification(base::Time current_time, |
+ SSLErrorClassification(content::WebContents* web_contents, |
+ base::Time current_time, |
const net::X509Certificate& cert); |
- ~SSLErrorClassification(); |
+ virtual ~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,19 +34,37 @@ class SSLErrorClassification { |
// CERT_DATE_INVALID. |
float InvalidDateSeverityScore() const; |
- static void RecordUMAStatistics(bool overridable); |
+ void RecordUMAStatistics(bool overridable) const; |
felt
2014/07/24 01:12:33
why is this method signature changing?
radhikabhar
2014/07/24 01:25:17
This was done according to @meacer's comment
|
+ void RecordCaptivePortalUMAStatistics(bool overridable) const; |
base::TimeDelta TimePassedSinceExpiry() const; |
private: |
- FRIEND_TEST_ALL_PREFIXES(SSLErrorClassification, TestDateInvalidScore); |
+ FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestDateInvalidScore); |
float CalculateScoreTimePassedSinceExpiry() const; |
+ float CalculateScoreEnvironments() const; |
+ |
+ // content::NotificationObserver: |
+ virtual void Observe( |
+ int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ content::WebContents* web_contents_; |
// This stores the current time. |
base::Time current_time_; |
- |
// This stores the certificate. |
const net::X509Certificate& cert_; |
+ // Is captive portal detection enabled? |
+ bool captive_portal_detection_enabled_; |
+ // Did the probe complete before the interstitial was closed? |
+ bool captive_portal_probe_completed_; |
+ // Did the captive portal probe receive an error or get a non-HTTP response? |
+ bool captive_portal_no_response_; |
+ // Was a captive portal detected? |
+ bool captive_portal_detected_; |
+ |
+ content::NotificationRegistrar registrar_; |
}; |
#endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |