blob: 100eb029751a9c5850bed935db9d7fc2554b4cb1 [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361# Copyright 2016 The Chromium Authors
jialiul792a6662016-12-03 01:44:102# 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",
Colin Blundell04197f22020-01-14 13:28:2736 "mitm_software_blocking_page.cc",
37 "mitm_software_blocking_page.h",
Colin Blundell28bc5222020-01-27 11:02:0938 "security_blocking_page_factory.h",
jialiula2c069252017-01-05 18:13:0439 "security_interstitial_controller_client.cc",
40 "security_interstitial_controller_client.h",
41 "security_interstitial_page.cc",
42 "security_interstitial_page.h",
Carlos ILe2201a452018-05-10 20:19:1243 "security_interstitial_tab_helper.cc",
44 "security_interstitial_tab_helper.h",
Xinghui Lu4ada2152020-10-05 20:21:3445 "settings_page_helper.h",
Colin Blundell72dfce12019-11-21 10:51:4346 "ssl_blocking_page.cc",
47 "ssl_blocking_page.h",
48 "ssl_blocking_page_base.cc",
49 "ssl_blocking_page_base.h",
Evan Stade1e71d6dd2019-10-29 03:04:4950 "ssl_cert_reporter.h",
Colin Blundell36f41d152020-01-24 13:51:5751 "ssl_error_assistant.cc",
52 "ssl_error_assistant.h",
Colin Blundell5eb994b2020-01-28 11:50:4853 "ssl_error_handler.cc",
54 "ssl_error_handler.h",
Evan Stade1e71d6dd2019-10-29 03:04:4955 "ssl_error_navigation_throttle.cc",
56 "ssl_error_navigation_throttle.h",
Colin Blundell7657b402020-02-25 09:46:5057 "stateful_ssl_host_state_delegate.cc",
58 "stateful_ssl_host_state_delegate.h",
Ali Jumaee602932020-01-24 16:39:1859 "unsafe_resource_util.cc",
60 "unsafe_resource_util.h",
Carlos IL8e8d7882018-03-21 18:23:3661 "urls.cc",
62 "urls.h",
Colin Blundell07c1a092020-02-12 11:40:1063 "utils.cc",
64 "utils.h",
jialiul792a6662016-12-03 01:44:1065 ]
66
Colin Blundell5eb994b2020-01-28 11:50:4867 public_deps = [
68 "//components/captive_portal/core:buildflags",
Colin Blundell9e1f7652021-06-25 20:24:3569 "//components/safe_browsing/core/browser/db:hit_report",
Colin Blundell5eb994b2020-01-28 11:50:4870 ]
ntfschra3234332016-12-22 01:15:4271
jialiul792a6662016-12-03 01:44:1072 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:2773 ":proto",
jialiul792a6662016-12-03 01:44:1074 "//base",
Colin Blundell8a0bf6252019-11-20 09:42:2775 "//build:branding_buildflags",
Yuta Hijikataadcc1b42020-11-27 08:49:2676 "//build:chromeos_buildflags",
Colin Blundell7cf3fe32020-01-23 09:52:4977 "//components/captive_portal/core",
Colin Blundellad1cfaf2020-02-19 11:50:4178 "//components/content_settings/core/browser",
79 "//components/content_settings/core/common",
Colin Blundell11fbeaad2020-02-07 16:16:3680 "//components/history/core/browser",
Colin Blundell12639cc2020-02-20 09:04:5081 "//components/keyed_service/core",
Colin Blundell8a0bf6252019-11-20 09:42:2782 "//components/network_time",
Mustafa Emre Acer06028d792021-01-05 19:48:5183 "//components/omnibox/common:common",
Colin Blundellad1cfaf2020-02-19 11:50:4184 "//components/pref_registry",
jialiula2c069252017-01-05 18:13:0485 "//components/prefs:prefs",
86 "//components/resources",
Awad Osman4c448d72023-01-03 16:38:5187 "//components/safe_browsing/core/common:common",
Ali Jumafb3dc1f2020-01-07 17:33:4788 "//components/safe_browsing/core/common:safe_browsing_prefs",
jialiula2c069252017-01-05 18:13:0489 "//components/security_interstitials/core:core",
Ali Jumaee602932020-01-24 16:39:1890 "//components/security_interstitials/core:unsafe_resource",
Colin Blundell61902d92020-01-06 11:33:1791 "//components/ssl_errors",
Carlos IL8e8d7882018-03-21 18:23:3692 "//components/strings:components_strings_grit",
Colin Blundell0a255cd2019-12-11 09:19:2593 "//components/url_formatter",
Colin Blundell8a0bf6252019-11-20 09:42:2794 "//components/user_prefs",
95 "//components/variations",
96 "//components/version_info",
jialiul792a6662016-12-03 01:44:1097 "//content/public/browser",
jialiula2c069252017-01-05 18:13:0498 "//content/public/common",
Colin Blundell36f41d152020-01-24 13:51:5799 "//crypto",
Matthew Denton49e0bfd2021-03-19 00:07:11100 "//services/cert_verifier/public/mojom",
Andy Paicu8b6f8712019-07-16 15:02:26101 "//services/network/public/cpp:cpp",
Colin Blundell36f41d152020-01-24 13:51:57102 "//third_party/protobuf:protobuf_lite",
103 "//third_party/re2",
jialiul792a6662016-12-03 01:44:10104 ]
Colin Blundell0a255cd2019-12-11 09:19:25105
Colin Blundell5eb994b2020-01-28 11:50:48106 if (enable_captive_portal_detection) {
Colin Blundell100156712020-02-06 19:27:09107 sources += [
108 "captive_portal_metrics_recorder.cc",
109 "captive_portal_metrics_recorder.h",
110 ]
Colin Blundell5eb994b2020-01-28 11:50:48111 deps += [ "//components/captive_portal/content" ]
112 }
113
Fabrice de Gansdca387a2021-09-22 23:21:16114 if (is_win || is_mac || is_fuchsia) {
Colin Blundell0a255cd2019-12-11 09:19:25115 deps += [ "//components/wifi" ]
116 }
Colin Blundell5eb994b2020-01-28 11:50:48117
Sylvain Defresneb55f2572020-10-05 13:17:49118 if (is_win) {
119 sources += [ "captive_portal_helper_win.cc" ]
120 }
121
Colin Blundell5eb994b2020-01-28 11:50:48122 if (is_android) {
Sylvain Defresneb55f2572020-10-05 13:17:49123 sources += [
124 "captive_portal_helper_android.cc",
125 "captive_portal_helper_android.h",
126 ]
Colin Blundell5eb994b2020-01-28 11:50:48127 deps +=
128 [ "//components/security_interstitials/content/android:jni_headers" ]
Kevin McNeef2b2c4e2022-12-05 18:10:23129 } else {
130 deps += [ "//components/guest_view/browser" ]
Colin Blundell5eb994b2020-01-28 11:50:48131 }
jialiul792a6662016-12-03 01:44:10132}
Carlos ILe2201a452018-05-10 20:19:12133
Colin Blundell8a0bf6252019-11-20 09:42:27134proto_library("proto") {
135 sources = [
136 "cert_logger.proto",
Colin Blundell2d95af652020-01-07 11:29:54137 "ssl_error_assistant.proto",
Colin Blundell8a0bf6252019-11-20 09:42:27138 ]
139}
140
Carlos ILe2201a452018-05-10 20:19:12141source_set("unit_tests") {
142 testonly = true
143 sources = [
Colin Blundell8a0bf6252019-11-20 09:42:27144 "certificate_error_report_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12145 "security_interstitial_tab_helper_unittest.cc",
Colin Blundell36f41d152020-01-24 13:51:57146 "ssl_error_assistant_unittest.cc",
Colin Blundellcb31a4722020-01-31 12:40:44147 "ssl_error_handler_unittest.cc",
Colin Blundell463ed0a2019-11-19 11:45:37148 "ssl_error_navigation_throttle_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12149 ]
150
151 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:27152 ":proto",
Carlos ILe2201a452018-05-10 20:19:12153 ":security_interstitial_page",
154 "//base",
155 "//base/test:test_support",
Yuta Hijikataadcc1b42020-11-27 08:49:26156 "//build:chromeos_buildflags",
Colin Blundellcb31a4722020-01-31 12:40:44157 "//components/captive_portal/content",
158 "//components/captive_portal/core:test_support",
159 "//components/embedder_support",
160 "//components/network_time",
Colin Blundell8a0bf6252019-11-20 09:42:27161 "//components/network_time:network_time_test_support",
162 "//components/prefs:test_support",
Carlos ILe2201a452018-05-10 20:19:12163 "//components/security_interstitials/core:core",
Colin Blundell8a0bf6252019-11-20 09:42:27164 "//components/version_info",
Carlos ILe2201a452018-05-10 20:19:12165 "//content/public/browser",
166 "//content/public/common",
167 "//content/test:test_support",
168 "//net:",
169 "//net:test_support",
Colin Blundell8a0bf6252019-11-20 09:42:27170 "//services/network:test_support",
Carlos ILe2201a452018-05-10 20:19:12171 "//testing/gtest",
172 ]
173}