Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: chrome/browser/ssl/ssl_error_classification.h

Issue 376663002: Calculate severity score for date_invalid error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
7
8 #include "base/time/time.h"
9 #include "net/cert/x509_certificate.h"
10
11 // This class calculates the severity scores for the different type of SSL
12 // errors.
13 class SSLErrorClassification {
14 public:
15 SSLErrorClassification(base::Time current_time,
16 const::net::X509Certificate& cert);
palmer 2014/07/11 17:24:18 Oops: No "::" between "const" and "net::". :)
radhikabhar 2014/07/11 18:59:34 Done. I am surprised it compiled without any error
17 ~SSLErrorClassification();
18
19 // This method checks whether the user clock is in the past or not.
20 static bool IsUserClockInThePast(base::Time time_now);
21
22 // This method checks whether the system time is too far in the future or
23 // the user is using a version of Chrome which is more than 1 year old.
24 static bool IsUserClockInTheFuture(base::Time time_now);
25
26 // A method which calculates the severity score when the ssl error is
27 // CERT_DATE_INVALID.
28 float InvalidDateSeverityScore() const;
29
30 static void RecordUMAStatistics(bool overridable);
31 base::TimeDelta TimePassedSinceExpiry() const;
32
33 private:
34 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassification, TestDateInvalidScore);
35
36 float CalculateScoreTimePassedSinceExpiry() const;
37
38 // This stores the current time.
39 base::Time current_time_;
40
41 // This stores the certificate.
42 const net::X509Certificate& cert_;
43 };
44
45 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698