summaryrefslogtreecommitdiff
path: root/chromium/components/security_interstitials/core/base_safe_browsing_error_ui.cc
blob: 7a7ca5290b1dae3793bef31949993190c705d052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/security_interstitials/core/base_safe_browsing_error_ui.h"

namespace security_interstitials {

BaseSafeBrowsingErrorUI::BaseSafeBrowsingErrorUI(
    const GURL& request_url,
    const GURL& main_frame_url,
    BaseSafeBrowsingErrorUI::SBInterstitialReason reason,
    const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options,
    const std::string& app_locale,
    const base::Time& time_triggered,
    ControllerClient* controller)
    : request_url_(request_url),
      main_frame_url_(main_frame_url),
      interstitial_reason_(reason),
      display_options_(display_options),
      app_locale_(app_locale),
      time_triggered_(time_triggered),
      controller_(controller) {}

BaseSafeBrowsingErrorUI::~BaseSafeBrowsingErrorUI() {}

BaseSafeBrowsingErrorUI::SBErrorDisplayOptions::SBErrorDisplayOptions(
    bool is_main_frame_load_blocked,
    bool is_extended_reporting_opt_in_allowed,
    bool is_off_the_record,
    bool is_extended_reporting_enabled,
    bool is_scout_reporting_enabled,
    bool is_proceed_anyway_disabled,
    bool should_open_links_in_new_tab,
    const std::string& help_center_article_link)
    : is_main_frame_load_blocked(is_main_frame_load_blocked),
      is_extended_reporting_opt_in_allowed(
          is_extended_reporting_opt_in_allowed),
      is_off_the_record(is_off_the_record),
      is_extended_reporting_enabled(is_extended_reporting_enabled),
      is_scout_reporting_enabled(is_scout_reporting_enabled),
      is_proceed_anyway_disabled(is_proceed_anyway_disabled),
      should_open_links_in_new_tab(should_open_links_in_new_tab),
      help_center_article_link(help_center_article_link) {}

BaseSafeBrowsingErrorUI::SBErrorDisplayOptions::SBErrorDisplayOptions(
    const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& other)
    : is_main_frame_load_blocked(other.is_main_frame_load_blocked),
      is_extended_reporting_opt_in_allowed(
          other.is_extended_reporting_opt_in_allowed),
      is_off_the_record(other.is_off_the_record),
      is_extended_reporting_enabled(other.is_extended_reporting_enabled),
      is_scout_reporting_enabled(other.is_scout_reporting_enabled),
      is_proceed_anyway_disabled(other.is_proceed_anyway_disabled),
      should_open_links_in_new_tab(other.should_open_links_in_new_tab),
      help_center_article_link(other.help_center_article_link) {}

}  // security_interstitials