Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_SSL_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 | 63 |
| 64 // Creates an SSL blocking page. If the blocking page isn't shown, the caller | 64 // Creates an SSL blocking page. If the blocking page isn't shown, the caller |
| 65 // is responsible for cleaning up the blocking page, otherwise the | 65 // is responsible for cleaning up the blocking page, otherwise the |
| 66 // interstitial takes ownership when shown. |options_mask| must be a bitwise | 66 // interstitial takes ownership when shown. |options_mask| must be a bitwise |
| 67 // mask of SSLBlockingPageOptionsMask values. | 67 // mask of SSLBlockingPageOptionsMask values. |
| 68 SSLBlockingPage(content::WebContents* web_contents, | 68 SSLBlockingPage(content::WebContents* web_contents, |
| 69 int cert_error, | 69 int cert_error, |
| 70 const net::SSLInfo& ssl_info, | 70 const net::SSLInfo& ssl_info, |
| 71 const GURL& request_url, | 71 const GURL& request_url, |
| 72 int options_mask, | 72 int options_mask, |
| 73 const base::Callback<void(bool)>& callback); | 73 const base::Callback<void(bool)>& callback, |
| 74 const base::Time& base_time); | |
| 74 | 75 |
| 75 // SecurityInterstitialPage method: | 76 // SecurityInterstitialPage method: |
| 76 const void* GetTypeForTesting() const override; | 77 const void* GetTypeForTesting() const override; |
| 77 | 78 |
| 78 // Returns true if |options_mask| refers to an overridable SSL error. | 79 // Returns true if |options_mask| refers to an overridable SSL error. |
| 79 static bool IsOptionsOverridable(int options_mask); | 80 static bool IsOptionsOverridable(int options_mask); |
| 80 | 81 |
| 81 protected: | 82 protected: |
| 82 // InterstitialPageDelegate implementation. | 83 // InterstitialPageDelegate implementation. |
| 83 void CommandReceived(const std::string& command) override; | 84 void CommandReceived(const std::string& command) override; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 111 // - This can be set to "false" dynamically to prevent the behaviour. | 112 // - This can be set to "false" dynamically to prevent the behaviour. |
| 112 const bool overridable_; | 113 const bool overridable_; |
| 113 bool danger_overridable_; | 114 bool danger_overridable_; |
| 114 // Has the site requested strict enforcement of certificate errors? | 115 // Has the site requested strict enforcement of certificate errors? |
| 115 const bool strict_enforcement_; | 116 const bool strict_enforcement_; |
| 116 // Did the user previously allow a bad certificate but the decision has now | 117 // Did the user previously allow a bad certificate but the decision has now |
| 117 // expired? | 118 // expired? |
| 118 const bool expired_but_previously_allowed_; | 119 const bool expired_but_previously_allowed_; |
| 119 scoped_ptr<SSLErrorClassification> ssl_error_classification_; | 120 scoped_ptr<SSLErrorClassification> ssl_error_classification_; |
| 120 scoped_ptr<SecurityInterstitialMetricsHelper> metrics_helper_; | 121 scoped_ptr<SecurityInterstitialMetricsHelper> metrics_helper_; |
| 122 // The interstitial is supposed to use this time as the basis for all | |
| 123 // calculations | |
|
felt
2015/02/20 16:01:53
nit: "...use this for all time-based calculations"
fahl
2015/02/23 23:47:49
Acknowledged.
| |
| 124 const base::Time base_time_; | |
|
felt
2015/02/20 16:01:53
nit: "time_shown_" might be more descriptive?
lgarron
2015/02/20 22:12:46
time_shown_ sounds like it's about the UI (instead
fahl
2015/02/23 23:47:49
hmm...although this time value is shown, its actua
fahl
2015/02/23 23:47:49
Did we agree on a variable name?
| |
| 121 | 125 |
| 122 // Which type of interstitial this is. | 126 // Which type of interstitial this is. |
| 123 enum SSLInterstitialReason { | 127 enum SSLInterstitialReason { |
| 124 SSL_REASON_SSL, | 128 SSL_REASON_SSL, |
| 125 SSL_REASON_BAD_CLOCK | 129 SSL_REASON_BAD_CLOCK |
| 126 } interstitial_reason_; | 130 } interstitial_reason_; |
| 127 | 131 |
| 128 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 132 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 135 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| OLD | NEW |