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_SSL_ERROR_UI_H_ | 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ |
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ | 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 // decision has expired. | 38 // decision has expired. |
39 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 3, | 39 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 3, |
40 }; | 40 }; |
41 | 41 |
42 SSLErrorUI(const GURL& request_url, | 42 SSLErrorUI(const GURL& request_url, |
43 int cert_error, | 43 int cert_error, |
44 const net::SSLInfo& ssl_info, | 44 const net::SSLInfo& ssl_info, |
45 int display_options, // Bitmask of SSLErrorOptionsMask values. | 45 int display_options, // Bitmask of SSLErrorOptionsMask values. |
46 const base::Time& time_triggered, | 46 const base::Time& time_triggered, |
47 ControllerClient* controller); | 47 ControllerClient* controller); |
48 ~SSLErrorUI(); | 48 virtual ~SSLErrorUI(); |
meacer
2017/06/22 22:35:37
Interesting, I thought this was already a base cla
estark
2017/06/22 23:17:48
Sure, I could do that as a follow-up. This is all
| |
49 | 49 |
50 void PopulateStringsForHTML(base::DictionaryValue* load_time_data); | 50 virtual void PopulateStringsForHTML(base::DictionaryValue* load_time_data); |
51 void HandleCommand(SecurityInterstitialCommands command); | 51 virtual void HandleCommand(SecurityInterstitialCommands command); |
52 | |
53 protected: | |
54 const net::SSLInfo& ssl_info() const; | |
55 const base::Time& time_triggered() const; | |
56 ControllerClient* controller() const; | |
52 | 57 |
53 private: | 58 private: |
54 void PopulateOverridableStrings(base::DictionaryValue* load_time_data); | 59 void PopulateOverridableStrings(base::DictionaryValue* load_time_data); |
55 void PopulateNonOverridableStrings(base::DictionaryValue* load_time_data); | 60 void PopulateNonOverridableStrings(base::DictionaryValue* load_time_data); |
56 | 61 |
57 const GURL request_url_; | 62 const GURL request_url_; |
58 const int cert_error_; | 63 const int cert_error_; |
59 const net::SSLInfo ssl_info_; | 64 const net::SSLInfo ssl_info_; |
60 const base::Time time_triggered_; | 65 const base::Time time_triggered_; |
61 | 66 |
62 // Set by the |display_options|. | 67 // Set by the |display_options|. |
63 const bool requested_strict_enforcement_; | 68 const bool requested_strict_enforcement_; |
64 const bool soft_override_enabled_; // UI provides a button to dismiss error. | 69 const bool soft_override_enabled_; // UI provides a button to dismiss error. |
65 const bool hard_override_enabled_; // Dismissing allowed, but no button. | 70 const bool hard_override_enabled_; // Dismissing allowed, but no button. |
66 | 71 |
67 ControllerClient* controller_; | 72 ControllerClient* controller_; |
68 bool user_made_decision_; // Whether the user made a choice in the UI. | 73 bool user_made_decision_; // Whether the user made a choice in the UI. |
69 | 74 |
70 DISALLOW_COPY_AND_ASSIGN(SSLErrorUI); | 75 DISALLOW_COPY_AND_ASSIGN(SSLErrorUI); |
71 }; | 76 }; |
72 | 77 |
73 } // security_interstitials | 78 } // security_interstitials |
74 | 79 |
75 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ | 80 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ |
OLD | NEW |