OLD | NEW |
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 COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ | 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ |
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ | 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "components/security_interstitials/core/controller_client.h" | 12 #include "components/security_interstitials/core/controller_client.h" |
13 #include "components/ssl_errors/error_classification.h" | 13 #include "components/ssl_errors/error_classification.h" |
14 #include "net/ssl/ssl_info.h" | 14 #include "net/ssl/ssl_info.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace security_interstitials { | 17 namespace security_interstitials { |
18 | 18 |
19 // Provides UI for SSL errors caused by clock misconfigurations. | 19 // Provides UI for SSL errors caused by clock misconfigurations. |
20 class BadClockUI { | 20 class BadClockUI { |
21 public: | 21 public: |
22 BadClockUI(const GURL& request_url, | 22 BadClockUI(const GURL& request_url, |
23 int cert_error, // Should correspond to a NET_ERROR | 23 int cert_error, // Should correspond to a NET_ERROR |
24 const net::SSLInfo& ssl_info, | 24 const net::SSLInfo& ssl_info, |
25 const base::Time& time_triggered, // Time the error was triggered | 25 const base::Time& time_triggered, // Time the error was triggered |
26 ssl_errors::ClockState clock_state, | 26 ssl_errors::ClockState clock_state, |
27 const std::string& languages, | |
28 ControllerClient* controller_); | 27 ControllerClient* controller_); |
29 ~BadClockUI(); | 28 ~BadClockUI(); |
30 | 29 |
31 void PopulateStringsForHTML(base::DictionaryValue* load_time_data); | 30 void PopulateStringsForHTML(base::DictionaryValue* load_time_data); |
32 void HandleCommand(SecurityInterstitialCommands command); | 31 void HandleCommand(SecurityInterstitialCommands command); |
33 | 32 |
34 private: | 33 private: |
35 void PopulateClockStrings(base::DictionaryValue* load_time_data); | 34 void PopulateClockStrings(base::DictionaryValue* load_time_data); |
36 | 35 |
37 const GURL request_url_; | 36 const GURL request_url_; |
38 const int cert_error_; | 37 const int cert_error_; |
39 const net::SSLInfo ssl_info_; | 38 const net::SSLInfo ssl_info_; |
40 const base::Time time_triggered_; | 39 const base::Time time_triggered_; |
41 const std::string languages_; | |
42 ControllerClient* controller_; | 40 ControllerClient* controller_; |
43 ssl_errors::ClockState clock_state_; | 41 ssl_errors::ClockState clock_state_; |
44 | 42 |
45 DISALLOW_COPY_AND_ASSIGN(BadClockUI); | 43 DISALLOW_COPY_AND_ASSIGN(BadClockUI); |
46 }; | 44 }; |
47 | 45 |
48 } // security_interstitials | 46 } // security_interstitials |
49 | 47 |
50 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ | 48 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ |
OLD | NEW |