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

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) 2012 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 #endif
8
9 #include "base/time/time.h"
10 #include "net/cert/x509_certificate.h"
11
12 // This class calculates the severity scores for the different type of SSL
13 // errors.
14 class SSLErrorClassification {
15 public:
16
felt 2014/07/10 18:41:10 nit: a single line after public public: SSLErr
radhikabhar 2014/07/10 20:04:43 Done.
17 SSLErrorClassification(base::Time current_time,
18 net::X509Certificate* cert);
19 ~SSLErrorClassification();
20
21 // Functions which check whether the user clock is wrong or not.
22 static bool IsUserClockInThePast(bool overridable, base::Time time_now);
23 static bool IsUserClockInTheFuture(bool overridable, base::Time time_now);
24
25 // A function which calcualtes the severity score when the ssl error is
26 // Date_Invalid.
27 float InvalidDateSeverityScore();
28
29 base::TimeDelta TimePassedSinceExpiry();
30
31 private:
32 float CalculateScoreTimePassedSinceExpiry();
33
34 // This stores the current time.
35 base::Time current_time_;
36
37 // This stores the certificate.
38 net::X509Certificate* cert_ ;
39
40 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassification, TestDateInvalidScore);
felt 2014/07/10 18:41:10 Usually put friend classes at the very beginning o
radhikabhar 2014/07/10 20:04:43 Done.
41 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698