blob: 19e15b2d9250ec8332b31a27b8c124547080ab13 [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",
Carlos IL1a5edec2020-06-12 17:56:5726 "insecure_form_blocking_page.cc",
27 "insecure_form_blocking_page.h",
28 "insecure_form_navigation_throttle.cc",
29 "insecure_form_navigation_throttle.h",
Carlos IL05412452020-10-12 21:09:5930 "insecure_form_tab_storage.cc",
31 "insecure_form_tab_storage.h",
Christopher Thompsonbe7210f2019-11-22 22:37:3032 "known_interception_disclosure_ui.cc",
33 "known_interception_disclosure_ui.h",
Christopher Thompsonbaec17122020-01-29 18:19:4134 "legacy_tls_blocking_page.cc",
35 "legacy_tls_blocking_page.h",
Colin Blundell04197f22020-01-14 13:28:2736 "mitm_software_blocking_page.cc",
37 "mitm_software_blocking_page.h",
Daniel Vogelheim7badd0d2019-02-04 14:42:1838 "origin_policy_interstitial_page.cc",
39 "origin_policy_interstitial_page.h",
Daniel Vogelheim6008f572018-09-24 14:35:1440 "origin_policy_ui.cc",
41 "origin_policy_ui.h",
Colin Blundell28bc5222020-01-27 11:02:0942 "security_blocking_page_factory.h",
jialiula2c069252017-01-05 18:13:0443 "security_interstitial_controller_client.cc",
44 "security_interstitial_controller_client.h",
45 "security_interstitial_page.cc",
46 "security_interstitial_page.h",
Carlos ILe2201a452018-05-10 20:19:1247 "security_interstitial_tab_helper.cc",
48 "security_interstitial_tab_helper.h",
Xinghui Lu4ada2152020-10-05 20:21:3449 "settings_page_helper.h",
Colin Blundell72dfce12019-11-21 10:51:4350 "ssl_blocking_page.cc",
51 "ssl_blocking_page.h",
52 "ssl_blocking_page_base.cc",
53 "ssl_blocking_page_base.h",
Evan Stade1e71d6dd2019-10-29 03:04:4954 "ssl_cert_reporter.h",
Colin Blundell36f41d152020-01-24 13:51:5755 "ssl_error_assistant.cc",
56 "ssl_error_assistant.h",
Colin Blundell5eb994b2020-01-28 11:50:4857 "ssl_error_handler.cc",
58 "ssl_error_handler.h",
Evan Stade1e71d6dd2019-10-29 03:04:4959 "ssl_error_navigation_throttle.cc",
60 "ssl_error_navigation_throttle.h",
Colin Blundell7657b402020-02-25 09:46:5061 "stateful_ssl_host_state_delegate.cc",
62 "stateful_ssl_host_state_delegate.h",
Ali Jumaee602932020-01-24 16:39:1863 "unsafe_resource_util.cc",
64 "unsafe_resource_util.h",
Carlos IL8e8d7882018-03-21 18:23:3665 "urls.cc",
66 "urls.h",
Colin Blundell07c1a092020-02-12 11:40:1067 "utils.cc",
68 "utils.h",
jialiul792a6662016-12-03 01:44:1069 ]
70
Colin Blundell5eb994b2020-01-28 11:50:4871 public_deps = [
72 "//components/captive_portal/core:buildflags",
Colin Blundell9e1f7652021-06-25 20:24:3573 "//components/safe_browsing/core/browser/db:hit_report",
Colin Blundell5eb994b2020-01-28 11:50:4874 ]
ntfschra3234332016-12-22 01:15:4275
jialiul792a6662016-12-03 01:44:1076 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:2777 ":proto",
jialiul792a6662016-12-03 01:44:1078 "//base",
Colin Blundell8a0bf6252019-11-20 09:42:2779 "//build:branding_buildflags",
Yuta Hijikataadcc1b42020-11-27 08:49:2680 "//build:chromeos_buildflags",
Colin Blundell7cf3fe32020-01-23 09:52:4981 "//components/captive_portal/core",
Colin Blundellad1cfaf2020-02-19 11:50:4182 "//components/content_settings/core/browser",
83 "//components/content_settings/core/common",
Colin Blundell11fbeaad2020-02-07 16:16:3684 "//components/history/core/browser",
Colin Blundell12639cc2020-02-20 09:04:5085 "//components/keyed_service/core",
Colin Blundell8a0bf6252019-11-20 09:42:2786 "//components/network_time",
Mustafa Emre Acer06028d792021-01-05 19:48:5187 "//components/omnibox/common:common",
Colin Blundellad1cfaf2020-02-19 11:50:4188 "//components/pref_registry",
jialiula2c069252017-01-05 18:13:0489 "//components/prefs:prefs",
90 "//components/resources",
Ali Jumafb3dc1f2020-01-07 17:33:4791 "//components/safe_browsing/core/common:safe_browsing_prefs",
jialiula2c069252017-01-05 18:13:0492 "//components/security_interstitials/core:core",
Ali Jumaee602932020-01-24 16:39:1893 "//components/security_interstitials/core:unsafe_resource",
Colin Blundell61902d92020-01-06 11:33:1794 "//components/ssl_errors",
Carlos IL8e8d7882018-03-21 18:23:3695 "//components/strings:components_strings_grit",
Colin Blundell0a255cd2019-12-11 09:19:2596 "//components/url_formatter",
Colin Blundell8a0bf6252019-11-20 09:42:2797 "//components/user_prefs",
98 "//components/variations",
99 "//components/version_info",
jialiul792a6662016-12-03 01:44:10100 "//content/public/browser",
jialiula2c069252017-01-05 18:13:04101 "//content/public/common",
Colin Blundell36f41d152020-01-24 13:51:57102 "//crypto",
Matthew Denton49e0bfd2021-03-19 00:07:11103 "//services/cert_verifier/public/mojom",
Andy Paicu8b6f8712019-07-16 15:02:26104 "//services/network/public/cpp:cpp",
Colin Blundell36f41d152020-01-24 13:51:57105 "//third_party/protobuf:protobuf_lite",
106 "//third_party/re2",
jialiul792a6662016-12-03 01:44:10107 ]
Colin Blundell0a255cd2019-12-11 09:19:25108
Colin Blundell5eb994b2020-01-28 11:50:48109 if (enable_captive_portal_detection) {
Colin Blundell100156712020-02-06 19:27:09110 sources += [
111 "captive_portal_metrics_recorder.cc",
112 "captive_portal_metrics_recorder.h",
113 ]
Colin Blundell5eb994b2020-01-28 11:50:48114 deps += [ "//components/captive_portal/content" ]
115 }
116
Colin Blundell0a255cd2019-12-11 09:19:25117 if (is_win || is_mac) {
118 deps += [ "//components/wifi" ]
119 }
Colin Blundell5eb994b2020-01-28 11:50:48120
Sylvain Defresneb55f2572020-10-05 13:17:49121 if (is_win) {
122 sources += [ "captive_portal_helper_win.cc" ]
123 }
124
Colin Blundell5eb994b2020-01-28 11:50:48125 if (is_android) {
Sylvain Defresneb55f2572020-10-05 13:17:49126 sources += [
127 "captive_portal_helper_android.cc",
128 "captive_portal_helper_android.h",
129 ]
Colin Blundell5eb994b2020-01-28 11:50:48130 deps +=
131 [ "//components/security_interstitials/content/android:jni_headers" ]
132 }
jialiul792a6662016-12-03 01:44:10133}
Carlos ILe2201a452018-05-10 20:19:12134
Colin Blundell8a0bf6252019-11-20 09:42:27135proto_library("proto") {
136 sources = [
137 "cert_logger.proto",
Colin Blundell2d95af652020-01-07 11:29:54138 "ssl_error_assistant.proto",
Colin Blundell8a0bf6252019-11-20 09:42:27139 ]
140}
141
Carlos ILe2201a452018-05-10 20:19:12142source_set("unit_tests") {
143 testonly = true
144 sources = [
Colin Blundell8a0bf6252019-11-20 09:42:27145 "certificate_error_report_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12146 "security_interstitial_tab_helper_unittest.cc",
Colin Blundell36f41d152020-01-24 13:51:57147 "ssl_error_assistant_unittest.cc",
Colin Blundellcb31a4722020-01-31 12:40:44148 "ssl_error_handler_unittest.cc",
Colin Blundell463ed0a2019-11-19 11:45:37149 "ssl_error_navigation_throttle_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12150 ]
151
152 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:27153 ":proto",
Carlos ILe2201a452018-05-10 20:19:12154 ":security_interstitial_page",
155 "//base",
156 "//base/test:test_support",
Yuta Hijikataadcc1b42020-11-27 08:49:26157 "//build:chromeos_buildflags",
Colin Blundellcb31a4722020-01-31 12:40:44158 "//components/captive_portal/content",
159 "//components/captive_portal/core:test_support",
160 "//components/embedder_support",
161 "//components/network_time",
Colin Blundell8a0bf6252019-11-20 09:42:27162 "//components/network_time:network_time_test_support",
163 "//components/prefs:test_support",
Carlos ILe2201a452018-05-10 20:19:12164 "//components/security_interstitials/core:core",
Colin Blundell8a0bf6252019-11-20 09:42:27165 "//components/version_info",
Carlos ILe2201a452018-05-10 20:19:12166 "//content/public/browser",
167 "//content/public/common",
168 "//content/test:test_support",
169 "//net:",
170 "//net:test_support",
Colin Blundell8a0bf6252019-11-20 09:42:27171 "//services/network:test_support",
Carlos ILe2201a452018-05-10 20:19:12172 "//testing/gtest",
173 ]
174}