jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 1 | # 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 Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 4 | import("//components/captive_portal/core/features.gni") |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 5 | import("//third_party/protobuf/proto_library.gni") |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 6 | |
jialiul | a2c06925 | 2017-01-05 18:13:04 | [diff] [blame] | 7 | static_library("security_interstitial_page") { |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 8 | sources = [ |
Colin Blundell | 61902d9 | 2020-01-06 11:33:17 | [diff] [blame] | 9 | "bad_clock_blocking_page.cc", |
| 10 | "bad_clock_blocking_page.h", |
Colin Blundell | 4c0f571 | 2020-01-20 12:35:00 | [diff] [blame] | 11 | "blocked_interception_blocking_page.cc", |
| 12 | "blocked_interception_blocking_page.h", |
Colin Blundell | 0a255cd | 2019-12-11 09:19:25 | [diff] [blame] | 13 | "captive_portal_blocking_page.cc", |
| 14 | "captive_portal_blocking_page.h", |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 15 | "captive_portal_helper.h", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 16 | "cert_report_helper.cc", |
| 17 | "cert_report_helper.h", |
| 18 | "certificate_error_report.cc", |
| 19 | "certificate_error_report.h", |
Colin Blundell | a1aa27c2 | 2020-01-07 09:19:08 | [diff] [blame] | 20 | "common_name_mismatch_handler.cc", |
| 21 | "common_name_mismatch_handler.h", |
Carlos IL | 8e8d788 | 2018-03-21 18:23:36 | [diff] [blame] | 22 | "connection_help_ui.cc", |
| 23 | "connection_help_ui.h", |
Colin Blundell | 11fbeaad | 2020-02-07 16:16:36 | [diff] [blame] | 24 | "content_metrics_helper.cc", |
| 25 | "content_metrics_helper.h", |
Carlos IL | 1a5edec | 2020-06-12 17:56:57 | [diff] [blame] | 26 | "insecure_form_blocking_page.cc", |
| 27 | "insecure_form_blocking_page.h", |
| 28 | "insecure_form_navigation_throttle.cc", |
| 29 | "insecure_form_navigation_throttle.h", |
Carlos IL | 0541245 | 2020-10-12 21:09:59 | [diff] [blame] | 30 | "insecure_form_tab_storage.cc", |
| 31 | "insecure_form_tab_storage.h", |
Christopher Thompson | be7210f | 2019-11-22 22:37:30 | [diff] [blame] | 32 | "known_interception_disclosure_ui.cc", |
| 33 | "known_interception_disclosure_ui.h", |
Christopher Thompson | baec1712 | 2020-01-29 18:19:41 | [diff] [blame] | 34 | "legacy_tls_blocking_page.cc", |
| 35 | "legacy_tls_blocking_page.h", |
Colin Blundell | 04197f2 | 2020-01-14 13:28:27 | [diff] [blame] | 36 | "mitm_software_blocking_page.cc", |
| 37 | "mitm_software_blocking_page.h", |
Daniel Vogelheim | 7badd0d | 2019-02-04 14:42:18 | [diff] [blame] | 38 | "origin_policy_interstitial_page.cc", |
| 39 | "origin_policy_interstitial_page.h", |
Daniel Vogelheim | 6008f57 | 2018-09-24 14:35:14 | [diff] [blame] | 40 | "origin_policy_ui.cc", |
| 41 | "origin_policy_ui.h", |
Colin Blundell | 28bc522 | 2020-01-27 11:02:09 | [diff] [blame] | 42 | "security_blocking_page_factory.h", |
jialiul | a2c06925 | 2017-01-05 18:13:04 | [diff] [blame] | 43 | "security_interstitial_controller_client.cc", |
| 44 | "security_interstitial_controller_client.h", |
| 45 | "security_interstitial_page.cc", |
| 46 | "security_interstitial_page.h", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 47 | "security_interstitial_tab_helper.cc", |
| 48 | "security_interstitial_tab_helper.h", |
Xinghui Lu | 4ada215 | 2020-10-05 20:21:34 | [diff] [blame] | 49 | "settings_page_helper.h", |
Colin Blundell | 72dfce1 | 2019-11-21 10:51:43 | [diff] [blame] | 50 | "ssl_blocking_page.cc", |
| 51 | "ssl_blocking_page.h", |
| 52 | "ssl_blocking_page_base.cc", |
| 53 | "ssl_blocking_page_base.h", |
Evan Stade | 1e71d6dd | 2019-10-29 03:04:49 | [diff] [blame] | 54 | "ssl_cert_reporter.h", |
Colin Blundell | 36f41d15 | 2020-01-24 13:51:57 | [diff] [blame] | 55 | "ssl_error_assistant.cc", |
| 56 | "ssl_error_assistant.h", |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 57 | "ssl_error_handler.cc", |
| 58 | "ssl_error_handler.h", |
Evan Stade | 1e71d6dd | 2019-10-29 03:04:49 | [diff] [blame] | 59 | "ssl_error_navigation_throttle.cc", |
| 60 | "ssl_error_navigation_throttle.h", |
Colin Blundell | 7657b40 | 2020-02-25 09:46:50 | [diff] [blame] | 61 | "stateful_ssl_host_state_delegate.cc", |
| 62 | "stateful_ssl_host_state_delegate.h", |
Ali Juma | ee60293 | 2020-01-24 16:39:18 | [diff] [blame] | 63 | "unsafe_resource_util.cc", |
| 64 | "unsafe_resource_util.h", |
Carlos IL | 8e8d788 | 2018-03-21 18:23:36 | [diff] [blame] | 65 | "urls.cc", |
| 66 | "urls.h", |
Colin Blundell | 07c1a09 | 2020-02-12 11:40:10 | [diff] [blame] | 67 | "utils.cc", |
| 68 | "utils.h", |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 69 | ] |
| 70 | |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 71 | public_deps = [ |
| 72 | "//components/captive_portal/core:buildflags", |
Colin Blundell | 9e1f765 | 2021-06-25 20:24:35 | [diff] [blame^] | 73 | "//components/safe_browsing/core/browser/db:hit_report", |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 74 | ] |
ntfschr | a323433 | 2016-12-22 01:15:42 | [diff] [blame] | 75 | |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 76 | deps = [ |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 77 | ":proto", |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 78 | "//base", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 79 | "//build:branding_buildflags", |
Yuta Hijikata | adcc1b4 | 2020-11-27 08:49:26 | [diff] [blame] | 80 | "//build:chromeos_buildflags", |
Colin Blundell | 7cf3fe3 | 2020-01-23 09:52:49 | [diff] [blame] | 81 | "//components/captive_portal/core", |
Colin Blundell | ad1cfaf | 2020-02-19 11:50:41 | [diff] [blame] | 82 | "//components/content_settings/core/browser", |
| 83 | "//components/content_settings/core/common", |
Colin Blundell | 11fbeaad | 2020-02-07 16:16:36 | [diff] [blame] | 84 | "//components/history/core/browser", |
Colin Blundell | 12639cc | 2020-02-20 09:04:50 | [diff] [blame] | 85 | "//components/keyed_service/core", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 86 | "//components/network_time", |
Mustafa Emre Acer | 06028d79 | 2021-01-05 19:48:51 | [diff] [blame] | 87 | "//components/omnibox/common:common", |
Colin Blundell | ad1cfaf | 2020-02-19 11:50:41 | [diff] [blame] | 88 | "//components/pref_registry", |
jialiul | a2c06925 | 2017-01-05 18:13:04 | [diff] [blame] | 89 | "//components/prefs:prefs", |
| 90 | "//components/resources", |
Ali Juma | fb3dc1f | 2020-01-07 17:33:47 | [diff] [blame] | 91 | "//components/safe_browsing/core/common:safe_browsing_prefs", |
jialiul | a2c06925 | 2017-01-05 18:13:04 | [diff] [blame] | 92 | "//components/security_interstitials/core:core", |
Ali Juma | ee60293 | 2020-01-24 16:39:18 | [diff] [blame] | 93 | "//components/security_interstitials/core:unsafe_resource", |
Colin Blundell | 61902d9 | 2020-01-06 11:33:17 | [diff] [blame] | 94 | "//components/ssl_errors", |
Carlos IL | 8e8d788 | 2018-03-21 18:23:36 | [diff] [blame] | 95 | "//components/strings:components_strings_grit", |
Colin Blundell | 0a255cd | 2019-12-11 09:19:25 | [diff] [blame] | 96 | "//components/url_formatter", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 97 | "//components/user_prefs", |
| 98 | "//components/variations", |
| 99 | "//components/version_info", |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 100 | "//content/public/browser", |
jialiul | a2c06925 | 2017-01-05 18:13:04 | [diff] [blame] | 101 | "//content/public/common", |
Colin Blundell | 36f41d15 | 2020-01-24 13:51:57 | [diff] [blame] | 102 | "//crypto", |
Matthew Denton | 49e0bfd | 2021-03-19 00:07:11 | [diff] [blame] | 103 | "//services/cert_verifier/public/mojom", |
Andy Paicu | 8b6f871 | 2019-07-16 15:02:26 | [diff] [blame] | 104 | "//services/network/public/cpp:cpp", |
Colin Blundell | 36f41d15 | 2020-01-24 13:51:57 | [diff] [blame] | 105 | "//third_party/protobuf:protobuf_lite", |
| 106 | "//third_party/re2", |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 107 | ] |
Colin Blundell | 0a255cd | 2019-12-11 09:19:25 | [diff] [blame] | 108 | |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 109 | if (enable_captive_portal_detection) { |
Colin Blundell | 10015671 | 2020-02-06 19:27:09 | [diff] [blame] | 110 | sources += [ |
| 111 | "captive_portal_metrics_recorder.cc", |
| 112 | "captive_portal_metrics_recorder.h", |
| 113 | ] |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 114 | deps += [ "//components/captive_portal/content" ] |
| 115 | } |
| 116 | |
Colin Blundell | 0a255cd | 2019-12-11 09:19:25 | [diff] [blame] | 117 | if (is_win || is_mac) { |
| 118 | deps += [ "//components/wifi" ] |
| 119 | } |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 120 | |
Sylvain Defresne | b55f257 | 2020-10-05 13:17:49 | [diff] [blame] | 121 | if (is_win) { |
| 122 | sources += [ "captive_portal_helper_win.cc" ] |
| 123 | } |
| 124 | |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 125 | if (is_android) { |
Sylvain Defresne | b55f257 | 2020-10-05 13:17:49 | [diff] [blame] | 126 | sources += [ |
| 127 | "captive_portal_helper_android.cc", |
| 128 | "captive_portal_helper_android.h", |
| 129 | ] |
Colin Blundell | 5eb994b | 2020-01-28 11:50:48 | [diff] [blame] | 130 | deps += |
| 131 | [ "//components/security_interstitials/content/android:jni_headers" ] |
| 132 | } |
jialiul | 792a666 | 2016-12-03 01:44:10 | [diff] [blame] | 133 | } |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 134 | |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 135 | proto_library("proto") { |
| 136 | sources = [ |
| 137 | "cert_logger.proto", |
Colin Blundell | 2d95af65 | 2020-01-07 11:29:54 | [diff] [blame] | 138 | "ssl_error_assistant.proto", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 139 | ] |
| 140 | } |
| 141 | |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 142 | source_set("unit_tests") { |
| 143 | testonly = true |
| 144 | sources = [ |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 145 | "certificate_error_report_unittest.cc", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 146 | "security_interstitial_tab_helper_unittest.cc", |
Colin Blundell | 36f41d15 | 2020-01-24 13:51:57 | [diff] [blame] | 147 | "ssl_error_assistant_unittest.cc", |
Colin Blundell | cb31a472 | 2020-01-31 12:40:44 | [diff] [blame] | 148 | "ssl_error_handler_unittest.cc", |
Colin Blundell | 463ed0a | 2019-11-19 11:45:37 | [diff] [blame] | 149 | "ssl_error_navigation_throttle_unittest.cc", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 150 | ] |
| 151 | |
| 152 | deps = [ |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 153 | ":proto", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 154 | ":security_interstitial_page", |
| 155 | "//base", |
| 156 | "//base/test:test_support", |
Yuta Hijikata | adcc1b4 | 2020-11-27 08:49:26 | [diff] [blame] | 157 | "//build:chromeos_buildflags", |
Colin Blundell | cb31a472 | 2020-01-31 12:40:44 | [diff] [blame] | 158 | "//components/captive_portal/content", |
| 159 | "//components/captive_portal/core:test_support", |
| 160 | "//components/embedder_support", |
| 161 | "//components/network_time", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 162 | "//components/network_time:network_time_test_support", |
| 163 | "//components/prefs:test_support", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 164 | "//components/security_interstitials/core:core", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 165 | "//components/version_info", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 166 | "//content/public/browser", |
| 167 | "//content/public/common", |
| 168 | "//content/test:test_support", |
| 169 | "//net:", |
| 170 | "//net:test_support", |
Colin Blundell | 8a0bf625 | 2019-11-20 09:42:27 | [diff] [blame] | 171 | "//services/network:test_support", |
Carlos IL | e2201a45 | 2018-05-10 20:19:12 | [diff] [blame] | 172 | "//testing/gtest", |
| 173 | ] |
| 174 | } |