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