blob: 823544c192d52c4a2fbcaf61404f193145c93e83 [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",
16 "captive_portal_helper_android.cc",
17 "captive_portal_helper_android.h",
18 "captive_portal_helper_win.cc",
Colin Blundell8a0bf6252019-11-20 09:42:2719 "cert_report_helper.cc",
20 "cert_report_helper.h",
21 "certificate_error_report.cc",
22 "certificate_error_report.h",
Colin Blundella1aa27c22020-01-07 09:19:0823 "common_name_mismatch_handler.cc",
24 "common_name_mismatch_handler.h",
Carlos IL8e8d7882018-03-21 18:23:3625 "connection_help_ui.cc",
26 "connection_help_ui.h",
Christopher Thompsonbe7210f2019-11-22 22:37:3027 "known_interception_disclosure_ui.cc",
28 "known_interception_disclosure_ui.h",
Christopher Thompsonbaec17122020-01-29 18:19:4129 "legacy_tls_blocking_page.cc",
30 "legacy_tls_blocking_page.h",
Colin Blundell04197f22020-01-14 13:28:2731 "mitm_software_blocking_page.cc",
32 "mitm_software_blocking_page.h",
Daniel Vogelheim7badd0d2019-02-04 14:42:1833 "origin_policy_interstitial_page.cc",
34 "origin_policy_interstitial_page.h",
Daniel Vogelheim6008f572018-09-24 14:35:1435 "origin_policy_ui.cc",
36 "origin_policy_ui.h",
Colin Blundell28bc5222020-01-27 11:02:0937 "security_blocking_page_factory.h",
jialiula2c069252017-01-05 18:13:0438 "security_interstitial_controller_client.cc",
39 "security_interstitial_controller_client.h",
40 "security_interstitial_page.cc",
41 "security_interstitial_page.h",
Carlos ILe2201a452018-05-10 20:19:1242 "security_interstitial_tab_helper.cc",
43 "security_interstitial_tab_helper.h",
Colin Blundell72dfce12019-11-21 10:51:4344 "ssl_blocking_page.cc",
45 "ssl_blocking_page.h",
46 "ssl_blocking_page_base.cc",
47 "ssl_blocking_page_base.h",
Evan Stade1e71d6dd2019-10-29 03:04:4948 "ssl_cert_reporter.h",
Colin Blundell36f41d152020-01-24 13:51:5749 "ssl_error_assistant.cc",
50 "ssl_error_assistant.h",
Colin Blundell5eb994b2020-01-28 11:50:4851 "ssl_error_handler.cc",
52 "ssl_error_handler.h",
Evan Stade1e71d6dd2019-10-29 03:04:4953 "ssl_error_navigation_throttle.cc",
54 "ssl_error_navigation_throttle.h",
Ali Jumaee602932020-01-24 16:39:1855 "unsafe_resource_util.cc",
56 "unsafe_resource_util.h",
Carlos IL8e8d7882018-03-21 18:23:3657 "urls.cc",
58 "urls.h",
jialiul792a6662016-12-03 01:44:1059 ]
60
Colin Blundell5eb994b2020-01-28 11:50:4861 public_deps = [
62 "//components/captive_portal/core:buildflags",
63 "//components/safe_browsing/core/db:hit_report",
64 ]
ntfschra3234332016-12-22 01:15:4265
jialiul792a6662016-12-03 01:44:1066 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:2767 ":proto",
jialiul792a6662016-12-03 01:44:1068 "//base",
Colin Blundell8a0bf6252019-11-20 09:42:2769 "//build:branding_buildflags",
Colin Blundell7cf3fe32020-01-23 09:52:4970 "//components/captive_portal/core",
Colin Blundell8a0bf6252019-11-20 09:42:2771 "//components/network_time",
jialiula2c069252017-01-05 18:13:0472 "//components/prefs:prefs",
73 "//components/resources",
Ali Jumafb3dc1f2020-01-07 17:33:4774 "//components/safe_browsing/core/common:safe_browsing_prefs",
jialiula2c069252017-01-05 18:13:0475 "//components/security_interstitials/core:core",
Ali Jumaee602932020-01-24 16:39:1876 "//components/security_interstitials/core:unsafe_resource",
Colin Blundell61902d92020-01-06 11:33:1777 "//components/ssl_errors",
Carlos IL8e8d7882018-03-21 18:23:3678 "//components/strings:components_strings_grit",
Colin Blundell0a255cd2019-12-11 09:19:2579 "//components/url_formatter",
Colin Blundell8a0bf6252019-11-20 09:42:2780 "//components/user_prefs",
81 "//components/variations",
82 "//components/version_info",
jialiul792a6662016-12-03 01:44:1083 "//content/public/browser",
jialiula2c069252017-01-05 18:13:0484 "//content/public/common",
Colin Blundell36f41d152020-01-24 13:51:5785 "//crypto",
Andy Paicu8b6f8712019-07-16 15:02:2686 "//services/network/public/cpp:cpp",
Colin Blundell36f41d152020-01-24 13:51:5787 "//third_party/protobuf:protobuf_lite",
88 "//third_party/re2",
jialiul792a6662016-12-03 01:44:1089 ]
Colin Blundell0a255cd2019-12-11 09:19:2590
Colin Blundell5eb994b2020-01-28 11:50:4891 if (enable_captive_portal_detection) {
Colin Blundell100156712020-02-06 19:27:0992 sources += [
93 "captive_portal_metrics_recorder.cc",
94 "captive_portal_metrics_recorder.h",
95 ]
Colin Blundell5eb994b2020-01-28 11:50:4896 deps += [ "//components/captive_portal/content" ]
97 }
98
Colin Blundell0a255cd2019-12-11 09:19:2599 if (is_win || is_mac) {
100 deps += [ "//components/wifi" ]
101 }
Colin Blundell5eb994b2020-01-28 11:50:48102
103 if (is_android) {
104 deps +=
105 [ "//components/security_interstitials/content/android:jni_headers" ]
106 }
jialiul792a6662016-12-03 01:44:10107}
Carlos ILe2201a452018-05-10 20:19:12108
Colin Blundell8a0bf6252019-11-20 09:42:27109proto_library("proto") {
110 sources = [
111 "cert_logger.proto",
Colin Blundell2d95af652020-01-07 11:29:54112 "ssl_error_assistant.proto",
Colin Blundell8a0bf6252019-11-20 09:42:27113 ]
114}
115
Carlos ILe2201a452018-05-10 20:19:12116source_set("unit_tests") {
117 testonly = true
118 sources = [
Colin Blundell8a0bf6252019-11-20 09:42:27119 "certificate_error_report_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12120 "security_interstitial_tab_helper_unittest.cc",
Colin Blundell36f41d152020-01-24 13:51:57121 "ssl_error_assistant_unittest.cc",
Colin Blundellcb31a4722020-01-31 12:40:44122 "ssl_error_handler_unittest.cc",
Colin Blundell463ed0a2019-11-19 11:45:37123 "ssl_error_navigation_throttle_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12124 ]
125
126 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:27127 ":proto",
Carlos ILe2201a452018-05-10 20:19:12128 ":security_interstitial_page",
129 "//base",
130 "//base/test:test_support",
Colin Blundellcb31a4722020-01-31 12:40:44131 "//components/captive_portal/content",
132 "//components/captive_portal/core:test_support",
133 "//components/embedder_support",
134 "//components/network_time",
Colin Blundell8a0bf6252019-11-20 09:42:27135 "//components/network_time:network_time_test_support",
136 "//components/prefs:test_support",
Carlos ILe2201a452018-05-10 20:19:12137 "//components/security_interstitials/core:core",
Colin Blundell8a0bf6252019-11-20 09:42:27138 "//components/version_info",
Carlos ILe2201a452018-05-10 20:19:12139 "//content/public/browser",
140 "//content/public/common",
141 "//content/test:test_support",
142 "//net:",
143 "//net:test_support",
Colin Blundell8a0bf6252019-11-20 09:42:27144 "//services/network:test_support",
Carlos ILe2201a452018-05-10 20:19:12145 "//testing/gtest",
146 ]
147}