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

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

Issue 1772143002: Use network time for bad clock interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass "gn check out/Default" Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ssl/bad_clock_blocking_page.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ 5 #ifndef CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_
6 #define CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ 6 #define CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/interstitials/security_interstitial_page.h" 13 #include "chrome/browser/interstitials/security_interstitial_page.h"
14 #include "chrome/browser/ssl/ssl_cert_reporter.h" 14 #include "chrome/browser/ssl/ssl_cert_reporter.h"
15 #include "components/ssl_errors/error_classification.h"
15 #include "net/ssl/ssl_info.h" 16 #include "net/ssl/ssl_info.h"
16 17
17 class CertReportHelper; 18 class CertReportHelper;
18 class GURL; 19 class GURL;
19 20
20 namespace security_interstitials { 21 namespace security_interstitials {
21 class BadClockUI; 22 class BadClockUI;
22 } 23 }
23 24
24 // This class is responsible for showing/hiding the interstitial page that 25 // This class is responsible for showing/hiding the interstitial page that
25 // occurs when an SSL error is triggered by a clock misconfiguration. It 26 // occurs when an SSL error is triggered by a clock misconfiguration. It
26 // creates the UI using security_interstitials::BadClockUI and then 27 // creates the UI using security_interstitials::BadClockUI and then
27 // displays it. It deletes itself when the interstitial page is closed. 28 // displays it. It deletes itself when the interstitial page is closed.
28 class BadClockBlockingPage : public SecurityInterstitialPage { 29 class BadClockBlockingPage : public SecurityInterstitialPage {
29 public: 30 public:
30 // Interstitial type, used in tests. 31 // Interstitial type, used in tests.
31 static InterstitialPageDelegate::TypeID kTypeForTesting; 32 static InterstitialPageDelegate::TypeID kTypeForTesting;
32 33
33 // If the blocking page isn't shown, the caller is responsible for cleaning 34 // If the blocking page isn't shown, the caller is responsible for cleaning
34 // up the blocking page. Otherwise, the interstitial takes ownership when 35 // up the blocking page. Otherwise, the interstitial takes ownership when
35 // shown. 36 // shown.
36 BadClockBlockingPage(content::WebContents* web_contents, 37 BadClockBlockingPage(content::WebContents* web_contents,
37 int cert_error, 38 int cert_error,
38 const net::SSLInfo& ssl_info, 39 const net::SSLInfo& ssl_info,
39 const GURL& request_url, 40 const GURL& request_url,
40 const base::Time& time_triggered, 41 const base::Time& time_triggered,
42 ssl_errors::ClockState clock_state,
41 scoped_ptr<SSLCertReporter> ssl_cert_reporter, 43 scoped_ptr<SSLCertReporter> ssl_cert_reporter,
42 const base::Callback<void(bool)>& callback); 44 const base::Callback<void(bool)>& callback);
43 45
44 ~BadClockBlockingPage() override; 46 ~BadClockBlockingPage() override;
45 47
46 // InterstitialPageDelegate method: 48 // InterstitialPageDelegate method:
47 InterstitialPageDelegate::TypeID GetTypeForTesting() const override; 49 InterstitialPageDelegate::TypeID GetTypeForTesting() const override;
48 50
49 void SetSSLCertReporterForTesting( 51 void SetSSLCertReporterForTesting(
50 scoped_ptr<SSLCertReporter> ssl_cert_reporter); 52 scoped_ptr<SSLCertReporter> ssl_cert_reporter);
(...skipping 19 matching lines...) Expand all
70 const base::Time time_triggered_; 72 const base::Time time_triggered_;
71 scoped_ptr<ChromeControllerClient> controller_; 73 scoped_ptr<ChromeControllerClient> controller_;
72 74
73 scoped_ptr<security_interstitials::BadClockUI> bad_clock_ui_; 75 scoped_ptr<security_interstitials::BadClockUI> bad_clock_ui_;
74 scoped_ptr<CertReportHelper> cert_report_helper_; 76 scoped_ptr<CertReportHelper> cert_report_helper_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage); 78 DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage);
77 }; 79 };
78 80
79 #endif // CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ 81 #endif // CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/bad_clock_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698