OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_SAFE_BROWSING_LOUD_ERROR_UI_H_ |
| 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_LOUD_ERROR_UI_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/time/time.h" |
| 10 #include "base/values.h" |
| 11 #include "components/security_interstitials/core/base_safe_browsing_error_ui.h" |
| 12 #include "components/security_interstitials/core/controller_client.h" |
| 13 #include "url/gurl.h" |
| 14 |
| 15 namespace security_interstitials { |
| 16 |
| 17 // This class displays UI for Safe Browsing errors that block page loads. This |
| 18 // class is purely about visual display; it does not do any error-handling logic |
| 19 // to determine what type of error should be displayed when. |
| 20 class SafeBrowsingLoudErrorUI |
| 21 : public security_interstitials::BaseSafeBrowsingErrorUI { |
| 22 public: |
| 23 SafeBrowsingLoudErrorUI( |
| 24 const GURL& request_url, |
| 25 const GURL& main_frame_url, |
| 26 BaseSafeBrowsingErrorUI::SBInterstitialReason reason, |
| 27 const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options, |
| 28 const std::string& app_locale, |
| 29 const base::Time& time_triggered, |
| 30 ControllerClient* controller); |
| 31 |
| 32 ~SafeBrowsingLoudErrorUI() override; |
| 33 |
| 34 void PopulateStringsForHTML(base::DictionaryValue* load_time_data) override; |
| 35 void HandleCommand(SecurityInterstitialCommands command) override; |
| 36 |
| 37 private: |
| 38 // Fills the passed dictionary with the values to be passed to the template |
| 39 // when creating the HTML. |
| 40 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); |
| 41 void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data); |
| 42 void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data); |
| 43 void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data); |
| 44 |
| 45 // const GURL request_url_; |
| 46 // const GURL main_frame_url_; |
| 47 // const base::Time time_triggered_; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingLoudErrorUI); |
| 50 }; |
| 51 |
| 52 } // security_interstitials |
| 53 |
| 54 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_LOUD_ERROR_UI_H_ |
OLD | NEW |