blob: 7dd2cb585ca41623e6519cb68eb221fa512804fe [file] [log] [blame]
jialiul792a6662016-12-03 01:44:101# 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.
Colin Blundell5eb994b2020-01-28 11:50:484import("//components/captive_portal/core/features.gni")
Colin Blundell8a0bf6252019-11-20 09:42:275import("//third_party/protobuf/proto_library.gni")
jialiul792a6662016-12-03 01:44:106
jialiula2c069252017-01-05 18:13:047static_library("security_interstitial_page") {
jialiul792a6662016-12-03 01:44:108 sources = [
Colin Blundell61902d92020-01-06 11:33:179 "bad_clock_blocking_page.cc",
10 "bad_clock_blocking_page.h",
Colin Blundell4c0f5712020-01-20 12:35:0011 "blocked_interception_blocking_page.cc",
12 "blocked_interception_blocking_page.h",
Colin Blundell0a255cd2019-12-11 09:19:2513 "captive_portal_blocking_page.cc",
14 "captive_portal_blocking_page.h",
Colin Blundell5eb994b2020-01-28 11:50:4815 "captive_portal_helper.h",
Colin Blundell8a0bf6252019-11-20 09:42:2716 "cert_report_helper.cc",
17 "cert_report_helper.h",
18 "certificate_error_report.cc",
19 "certificate_error_report.h",
Colin Blundella1aa27c22020-01-07 09:19:0820 "common_name_mismatch_handler.cc",
21 "common_name_mismatch_handler.h",
Carlos IL8e8d7882018-03-21 18:23:3622 "connection_help_ui.cc",
23 "connection_help_ui.h",
Colin Blundell11fbeaad2020-02-07 16:16:3624 "content_metrics_helper.cc",
25 "content_metrics_helper.h",
Chris Thompson80e216e2021-07-09 23:25:0926 "https_only_mode_blocking_page.cc",
27 "https_only_mode_blocking_page.h",
Carlos IL1a5edec2020-06-12 17:56:5728 "insecure_form_blocking_page.cc",
29 "insecure_form_blocking_page.h",
30 "insecure_form_navigation_throttle.cc",
31 "insecure_form_navigation_throttle.h",
Carlos IL05412452020-10-12 21:09:5932 "insecure_form_tab_storage.cc",
33 "insecure_form_tab_storage.h",
Christopher Thompsonbe7210f2019-11-22 22:37:3034 "known_interception_disclosure_ui.cc",
35 "known_interception_disclosure_ui.h",
Christopher Thompsonbaec17122020-01-29 18:19:4136 "legacy_tls_blocking_page.cc",
37 "legacy_tls_blocking_page.h",
Colin Blundell04197f22020-01-14 13:28:2738 "mitm_software_blocking_page.cc",
39 "mitm_software_blocking_page.h",
Daniel Vogelheim7badd0d2019-02-04 14:42:1840 "origin_policy_interstitial_page.cc",
41 "origin_policy_interstitial_page.h",
Daniel Vogelheim6008f572018-09-24 14:35:1442 "origin_policy_ui.cc",
43 "origin_policy_ui.h",
Colin Blundell28bc5222020-01-27 11:02:0944 "security_blocking_page_factory.h",
jialiula2c069252017-01-05 18:13:0445 "security_interstitial_controller_client.cc",
46 "security_interstitial_controller_client.h",
47 "security_interstitial_page.cc",
48 "security_interstitial_page.h",
Carlos ILe2201a452018-05-10 20:19:1249 "security_interstitial_tab_helper.cc",
50 "security_interstitial_tab_helper.h",
Xinghui Lu4ada2152020-10-05 20:21:3451 "settings_page_helper.h",
Colin Blundell72dfce12019-11-21 10:51:4352 "ssl_blocking_page.cc",
53 "ssl_blocking_page.h",
54 "ssl_blocking_page_base.cc",
55 "ssl_blocking_page_base.h",
Evan Stade1e71d6dd2019-10-29 03:04:4956 "ssl_cert_reporter.h",
Colin Blundell36f41d152020-01-24 13:51:5757 "ssl_error_assistant.cc",
58 "ssl_error_assistant.h",
Colin Blundell5eb994b2020-01-28 11:50:4859 "ssl_error_handler.cc",
60 "ssl_error_handler.h",
Evan Stade1e71d6dd2019-10-29 03:04:4961 "ssl_error_navigation_throttle.cc",
62 "ssl_error_navigation_throttle.h",
Colin Blundell7657b402020-02-25 09:46:5063 "stateful_ssl_host_state_delegate.cc",
64 "stateful_ssl_host_state_delegate.h",
Ali Jumaee602932020-01-24 16:39:1865 "unsafe_resource_util.cc",
66 "unsafe_resource_util.h",
Carlos IL8e8d7882018-03-21 18:23:3667 "urls.cc",
68 "urls.h",
Colin Blundell07c1a092020-02-12 11:40:1069 "utils.cc",
70 "utils.h",
jialiul792a6662016-12-03 01:44:1071 ]
72
Colin Blundell5eb994b2020-01-28 11:50:4873 public_deps = [
74 "//components/captive_portal/core:buildflags",
Colin Blundell9e1f7652021-06-25 20:24:3575 "//components/safe_browsing/core/browser/db:hit_report",
Colin Blundell5eb994b2020-01-28 11:50:4876 ]
ntfschra3234332016-12-22 01:15:4277
jialiul792a6662016-12-03 01:44:1078 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:2779 ":proto",
jialiul792a6662016-12-03 01:44:1080 "//base",
Colin Blundell8a0bf6252019-11-20 09:42:2781 "//build:branding_buildflags",
Yuta Hijikataadcc1b42020-11-27 08:49:2682 "//build:chromeos_buildflags",
Colin Blundell7cf3fe32020-01-23 09:52:4983 "//components/captive_portal/core",
Colin Blundellad1cfaf2020-02-19 11:50:4184 "//components/content_settings/core/browser",
85 "//components/content_settings/core/common",
Colin Blundell11fbeaad2020-02-07 16:16:3686 "//components/history/core/browser",
Colin Blundell12639cc2020-02-20 09:04:5087 "//components/keyed_service/core",
Colin Blundell8a0bf6252019-11-20 09:42:2788 "//components/network_time",
Mustafa Emre Acer06028d792021-01-05 19:48:5189 "//components/omnibox/common:common",
Colin Blundellad1cfaf2020-02-19 11:50:4190 "//components/pref_registry",
jialiula2c069252017-01-05 18:13:0491 "//components/prefs:prefs",
92 "//components/resources",
Ali Jumafb3dc1f2020-01-07 17:33:4793 "//components/safe_browsing/core/common:safe_browsing_prefs",
jialiula2c069252017-01-05 18:13:0494 "//components/security_interstitials/core:core",
Ali Jumaee602932020-01-24 16:39:1895 "//components/security_interstitials/core:unsafe_resource",
Colin Blundell61902d92020-01-06 11:33:1796 "//components/ssl_errors",
Carlos IL8e8d7882018-03-21 18:23:3697 "//components/strings:components_strings_grit",
Colin Blundell0a255cd2019-12-11 09:19:2598 "//components/url_formatter",
Colin Blundell8a0bf6252019-11-20 09:42:2799 "//components/user_prefs",
100 "//components/variations",
101 "//components/version_info",
jialiul792a6662016-12-03 01:44:10102 "//content/public/browser",
jialiula2c069252017-01-05 18:13:04103 "//content/public/common",
Colin Blundell36f41d152020-01-24 13:51:57104 "//crypto",
Matthew Denton49e0bfd2021-03-19 00:07:11105 "//services/cert_verifier/public/mojom",
Andy Paicu8b6f8712019-07-16 15:02:26106 "//services/network/public/cpp:cpp",
Colin Blundell36f41d152020-01-24 13:51:57107 "//third_party/protobuf:protobuf_lite",
108 "//third_party/re2",
jialiul792a6662016-12-03 01:44:10109 ]
Colin Blundell0a255cd2019-12-11 09:19:25110
Colin Blundell5eb994b2020-01-28 11:50:48111 if (enable_captive_portal_detection) {
Colin Blundell100156712020-02-06 19:27:09112 sources += [
113 "captive_portal_metrics_recorder.cc",
114 "captive_portal_metrics_recorder.h",
115 ]
Colin Blundell5eb994b2020-01-28 11:50:48116 deps += [ "//components/captive_portal/content" ]
117 }
118
Fabrice de Gansdca387a2021-09-22 23:21:16119 if (is_win || is_mac || is_fuchsia) {
Colin Blundell0a255cd2019-12-11 09:19:25120 deps += [ "//components/wifi" ]
121 }
Colin Blundell5eb994b2020-01-28 11:50:48122
Sylvain Defresneb55f2572020-10-05 13:17:49123 if (is_win) {
124 sources += [ "captive_portal_helper_win.cc" ]
125 }
126
Colin Blundell5eb994b2020-01-28 11:50:48127 if (is_android) {
Sylvain Defresneb55f2572020-10-05 13:17:49128 sources += [
129 "captive_portal_helper_android.cc",
130 "captive_portal_helper_android.h",
131 ]
Colin Blundell5eb994b2020-01-28 11:50:48132 deps +=
133 [ "//components/security_interstitials/content/android:jni_headers" ]
134 }
jialiul792a6662016-12-03 01:44:10135}
Carlos ILe2201a452018-05-10 20:19:12136
Colin Blundell8a0bf6252019-11-20 09:42:27137proto_library("proto") {
138 sources = [
139 "cert_logger.proto",
Colin Blundell2d95af652020-01-07 11:29:54140 "ssl_error_assistant.proto",
Colin Blundell8a0bf6252019-11-20 09:42:27141 ]
142}
143
Carlos ILe2201a452018-05-10 20:19:12144source_set("unit_tests") {
145 testonly = true
146 sources = [
Colin Blundell8a0bf6252019-11-20 09:42:27147 "certificate_error_report_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12148 "security_interstitial_tab_helper_unittest.cc",
Colin Blundell36f41d152020-01-24 13:51:57149 "ssl_error_assistant_unittest.cc",
Colin Blundellcb31a4722020-01-31 12:40:44150 "ssl_error_handler_unittest.cc",
Colin Blundell463ed0a2019-11-19 11:45:37151 "ssl_error_navigation_throttle_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12152 ]
153
154 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:27155 ":proto",
Carlos ILe2201a452018-05-10 20:19:12156 ":security_interstitial_page",
157 "//base",
158 "//base/test:test_support",
Yuta Hijikataadcc1b42020-11-27 08:49:26159 "//build:chromeos_buildflags",
Colin Blundellcb31a4722020-01-31 12:40:44160 "//components/captive_portal/content",
161 "//components/captive_portal/core:test_support",
162 "//components/embedder_support",
163 "//components/network_time",
Colin Blundell8a0bf6252019-11-20 09:42:27164 "//components/network_time:network_time_test_support",
165 "//components/prefs:test_support",
Carlos ILe2201a452018-05-10 20:19:12166 "//components/security_interstitials/core:core",
Colin Blundell8a0bf6252019-11-20 09:42:27167 "//components/version_info",
Carlos ILe2201a452018-05-10 20:19:12168 "//content/public/browser",
169 "//content/public/common",
170 "//content/test:test_support",
171 "//net:",
172 "//net:test_support",
Colin Blundell8a0bf6252019-11-20 09:42:27173 "//services/network:test_support",
Carlos ILe2201a452018-05-10 20:19:12174 "//testing/gtest",
175 ]
176}