Clean up deprecated sources assignment filter in //components/security_interstitials

Remove deprecated_default_sources_assignment_filter and replace
it with explicit is_win, is_mac, etc. sections.

Bug: 1018739
Change-Id: Ia503bd748f633f2526feafc81c823f6b78132710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446051
Reviewed-by: Adrienne Porter Felt <[email protected]>
Commit-Queue: Sylvain Defresne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#813718}
diff --git a/components/security_interstitials/content/BUILD.gn b/components/security_interstitials/content/BUILD.gn
index 03c039a..ccd44b5 100644
--- a/components/security_interstitials/content/BUILD.gn
+++ b/components/security_interstitials/content/BUILD.gn
@@ -4,13 +4,6 @@
 import("//components/captive_portal/core/features.gni")
 import("//third_party/protobuf/proto_library.gni")
 
-# This file depends on the legacy global sources assignment filter. It should
-# be converted to check target platform before assigning source files to the
-# sources variable. Remove this import and set_sources_assignment_filter call
-# when the file has been converted. See https://crbug.com/1018739 for details.
-import("//build/config/deprecated_default_sources_assignment_filter.gni")
-set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
-
 static_library("security_interstitial_page") {
   sources = [
     "bad_clock_blocking_page.cc",
@@ -20,9 +13,6 @@
     "captive_portal_blocking_page.cc",
     "captive_portal_blocking_page.h",
     "captive_portal_helper.h",
-    "captive_portal_helper_android.cc",
-    "captive_portal_helper_android.h",
-    "captive_portal_helper_win.cc",
     "cert_report_helper.cc",
     "cert_report_helper.h",
     "certificate_error_report.cc",
@@ -122,7 +112,15 @@
     deps += [ "//components/wifi" ]
   }
 
+  if (is_win) {
+    sources += [ "captive_portal_helper_win.cc" ]
+  }
+
   if (is_android) {
+    sources += [
+      "captive_portal_helper_android.cc",
+      "captive_portal_helper_android.h",
+    ]
     deps +=
         [ "//components/security_interstitials/content/android:jni_headers" ]
   }