base_safe_browsing_error_ui.cc 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2017 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. #include "components/security_interstitials/core/base_safe_browsing_error_ui.h"
  5. namespace security_interstitials {
  6. BaseSafeBrowsingErrorUI::BaseSafeBrowsingErrorUI(
  7. const GURL& request_url,
  8. const GURL& main_frame_url,
  9. BaseSafeBrowsingErrorUI::SBInterstitialReason reason,
  10. const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options,
  11. const std::string& app_locale,
  12. const base::Time& time_triggered,
  13. ControllerClient* controller)
  14. : request_url_(request_url),
  15. main_frame_url_(main_frame_url),
  16. interstitial_reason_(reason),
  17. display_options_(display_options),
  18. app_locale_(app_locale),
  19. time_triggered_(time_triggered),
  20. controller_(controller) {}
  21. BaseSafeBrowsingErrorUI::~BaseSafeBrowsingErrorUI() {}
  22. BaseSafeBrowsingErrorUI::SBErrorDisplayOptions::SBErrorDisplayOptions(
  23. bool is_main_frame_load_blocked,
  24. bool is_extended_reporting_opt_in_allowed,
  25. bool is_off_the_record,
  26. bool is_extended_reporting_enabled,
  27. bool is_extended_reporting_policy_managed,
  28. bool is_enhanced_protection_enabled,
  29. bool is_proceed_anyway_disabled,
  30. bool should_open_links_in_new_tab,
  31. bool always_show_back_to_safety,
  32. bool is_enhanced_protection_message_enabled,
  33. bool is_safe_browsing_managed,
  34. const std::string& help_center_article_link)
  35. : is_main_frame_load_blocked(is_main_frame_load_blocked),
  36. is_extended_reporting_opt_in_allowed(
  37. is_extended_reporting_opt_in_allowed),
  38. is_off_the_record(is_off_the_record),
  39. is_extended_reporting_enabled(is_extended_reporting_enabled),
  40. is_extended_reporting_policy_managed(
  41. is_extended_reporting_policy_managed),
  42. is_enhanced_protection_enabled(is_enhanced_protection_enabled),
  43. is_proceed_anyway_disabled(is_proceed_anyway_disabled),
  44. should_open_links_in_new_tab(should_open_links_in_new_tab),
  45. always_show_back_to_safety(always_show_back_to_safety),
  46. is_enhanced_protection_message_enabled(
  47. is_enhanced_protection_message_enabled),
  48. is_safe_browsing_managed(is_safe_browsing_managed),
  49. help_center_article_link(help_center_article_link) {}
  50. BaseSafeBrowsingErrorUI::SBErrorDisplayOptions::SBErrorDisplayOptions(
  51. const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& other)
  52. : is_main_frame_load_blocked(other.is_main_frame_load_blocked),
  53. is_extended_reporting_opt_in_allowed(
  54. other.is_extended_reporting_opt_in_allowed),
  55. is_off_the_record(other.is_off_the_record),
  56. is_extended_reporting_enabled(other.is_extended_reporting_enabled),
  57. is_extended_reporting_policy_managed(
  58. other.is_extended_reporting_policy_managed),
  59. is_enhanced_protection_enabled(other.is_enhanced_protection_enabled),
  60. is_proceed_anyway_disabled(other.is_proceed_anyway_disabled),
  61. should_open_links_in_new_tab(other.should_open_links_in_new_tab),
  62. always_show_back_to_safety(other.always_show_back_to_safety),
  63. is_enhanced_protection_message_enabled(
  64. other.is_enhanced_protection_message_enabled),
  65. is_safe_browsing_managed(other.is_safe_browsing_managed),
  66. help_center_article_link(other.help_center_article_link) {}
  67. } // security_interstitials