blob: dd15ae1fdb9f891e1560339c6bf2528c1443e235 [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",
Colin Blundell11fbeaad2020-02-07 16:16:3627 "content_metrics_helper.cc",
28 "content_metrics_helper.h",
Christopher Thompsonbe7210f2019-11-22 22:37:3029 "known_interception_disclosure_ui.cc",
30 "known_interception_disclosure_ui.h",
Christopher Thompsonbaec17122020-01-29 18:19:4131 "legacy_tls_blocking_page.cc",
32 "legacy_tls_blocking_page.h",
Colin Blundell04197f22020-01-14 13:28:2733 "mitm_software_blocking_page.cc",
34 "mitm_software_blocking_page.h",
Daniel Vogelheim7badd0d2019-02-04 14:42:1835 "origin_policy_interstitial_page.cc",
36 "origin_policy_interstitial_page.h",
Daniel Vogelheim6008f572018-09-24 14:35:1437 "origin_policy_ui.cc",
38 "origin_policy_ui.h",
Colin Blundell28bc5222020-01-27 11:02:0939 "security_blocking_page_factory.h",
jialiula2c069252017-01-05 18:13:0440 "security_interstitial_controller_client.cc",
41 "security_interstitial_controller_client.h",
42 "security_interstitial_page.cc",
43 "security_interstitial_page.h",
Carlos ILe2201a452018-05-10 20:19:1244 "security_interstitial_tab_helper.cc",
45 "security_interstitial_tab_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",
Ali Jumaee602932020-01-24 16:39:1857 "unsafe_resource_util.cc",
58 "unsafe_resource_util.h",
Carlos IL8e8d7882018-03-21 18:23:3659 "urls.cc",
60 "urls.h",
Colin Blundell07c1a092020-02-12 11:40:1061 "utils.cc",
62 "utils.h",
jialiul792a6662016-12-03 01:44:1063 ]
64
Colin Blundell5eb994b2020-01-28 11:50:4865 public_deps = [
66 "//components/captive_portal/core:buildflags",
67 "//components/safe_browsing/core/db:hit_report",
68 ]
ntfschra3234332016-12-22 01:15:4269
jialiul792a6662016-12-03 01:44:1070 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:2771 ":proto",
jialiul792a6662016-12-03 01:44:1072 "//base",
Colin Blundell8a0bf6252019-11-20 09:42:2773 "//build:branding_buildflags",
Colin Blundell7cf3fe32020-01-23 09:52:4974 "//components/captive_portal/core",
Colin Blundell11fbeaad2020-02-07 16:16:3675 "//components/history/core/browser",
Colin Blundell8a0bf6252019-11-20 09:42:2776 "//components/network_time",
jialiula2c069252017-01-05 18:13:0477 "//components/prefs:prefs",
78 "//components/resources",
Ali Jumafb3dc1f2020-01-07 17:33:4779 "//components/safe_browsing/core/common:safe_browsing_prefs",
jialiula2c069252017-01-05 18:13:0480 "//components/security_interstitials/core:core",
Ali Jumaee602932020-01-24 16:39:1881 "//components/security_interstitials/core:unsafe_resource",
Colin Blundell61902d92020-01-06 11:33:1782 "//components/ssl_errors",
Carlos IL8e8d7882018-03-21 18:23:3683 "//components/strings:components_strings_grit",
Colin Blundell0a255cd2019-12-11 09:19:2584 "//components/url_formatter",
Colin Blundell8a0bf6252019-11-20 09:42:2785 "//components/user_prefs",
86 "//components/variations",
87 "//components/version_info",
jialiul792a6662016-12-03 01:44:1088 "//content/public/browser",
jialiula2c069252017-01-05 18:13:0489 "//content/public/common",
Colin Blundell36f41d152020-01-24 13:51:5790 "//crypto",
Andy Paicu8b6f8712019-07-16 15:02:2691 "//services/network/public/cpp:cpp",
Colin Blundell36f41d152020-01-24 13:51:5792 "//third_party/protobuf:protobuf_lite",
93 "//third_party/re2",
jialiul792a6662016-12-03 01:44:1094 ]
Colin Blundell0a255cd2019-12-11 09:19:2595
Colin Blundell5eb994b2020-01-28 11:50:4896 if (enable_captive_portal_detection) {
Colin Blundell100156712020-02-06 19:27:0997 sources += [
98 "captive_portal_metrics_recorder.cc",
99 "captive_portal_metrics_recorder.h",
100 ]
Colin Blundell5eb994b2020-01-28 11:50:48101 deps += [ "//components/captive_portal/content" ]
102 }
103
Colin Blundell0a255cd2019-12-11 09:19:25104 if (is_win || is_mac) {
105 deps += [ "//components/wifi" ]
106 }
Colin Blundell5eb994b2020-01-28 11:50:48107
108 if (is_android) {
109 deps +=
110 [ "//components/security_interstitials/content/android:jni_headers" ]
111 }
jialiul792a6662016-12-03 01:44:10112}
Carlos ILe2201a452018-05-10 20:19:12113
Colin Blundell8a0bf6252019-11-20 09:42:27114proto_library("proto") {
115 sources = [
116 "cert_logger.proto",
Colin Blundell2d95af652020-01-07 11:29:54117 "ssl_error_assistant.proto",
Colin Blundell8a0bf6252019-11-20 09:42:27118 ]
119}
120
Carlos ILe2201a452018-05-10 20:19:12121source_set("unit_tests") {
122 testonly = true
123 sources = [
Colin Blundell8a0bf6252019-11-20 09:42:27124 "certificate_error_report_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12125 "security_interstitial_tab_helper_unittest.cc",
Colin Blundell36f41d152020-01-24 13:51:57126 "ssl_error_assistant_unittest.cc",
Colin Blundellcb31a4722020-01-31 12:40:44127 "ssl_error_handler_unittest.cc",
Colin Blundell463ed0a2019-11-19 11:45:37128 "ssl_error_navigation_throttle_unittest.cc",
Carlos ILe2201a452018-05-10 20:19:12129 ]
130
131 deps = [
Colin Blundell8a0bf6252019-11-20 09:42:27132 ":proto",
Carlos ILe2201a452018-05-10 20:19:12133 ":security_interstitial_page",
134 "//base",
135 "//base/test:test_support",
Colin Blundellcb31a4722020-01-31 12:40:44136 "//components/captive_portal/content",
137 "//components/captive_portal/core:test_support",
138 "//components/embedder_support",
139 "//components/network_time",
Colin Blundell8a0bf6252019-11-20 09:42:27140 "//components/network_time:network_time_test_support",
141 "//components/prefs:test_support",
Carlos ILe2201a452018-05-10 20:19:12142 "//components/security_interstitials/core:core",
Colin Blundell8a0bf6252019-11-20 09:42:27143 "//components/version_info",
Carlos ILe2201a452018-05-10 20:19:12144 "//content/public/browser",
145 "//content/public/common",
146 "//content/test:test_support",
147 "//net:",
148 "//net:test_support",
Colin Blundell8a0bf6252019-11-20 09:42:27149 "//services/network:test_support",
Carlos ILe2201a452018-05-10 20:19:12150 "//testing/gtest",
151 ]
152}