Commit ac83b0e7 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

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

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

Bug: 1018739
Change-Id: I42b7d21fa7952ffd68333222dc5371d42e0d2ad3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2445613Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813657}
parent eb457ac2
...@@ -8,21 +8,12 @@ if (is_android) { ...@@ -8,21 +8,12 @@ if (is_android) {
import("//build/config/android/rules.gni") import("//build/config/android/rules.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("quarantine") { static_library("quarantine") {
sources = [ sources = [
"quarantine.cc", "quarantine.cc",
"quarantine.h", "quarantine.h",
"quarantine_impl.cc", "quarantine_impl.cc",
"quarantine_impl.h", "quarantine_impl.h",
"quarantine_mac.mm",
"quarantine_win.cc",
] ]
public_deps = [ "//components/services/quarantine/public/mojom" ] public_deps = [ "//components/services/quarantine/public/mojom" ]
...@@ -35,10 +26,12 @@ static_library("quarantine") { ...@@ -35,10 +26,12 @@ static_library("quarantine") {
] ]
if (is_win) { if (is_win) {
sources += [ "quarantine_win.cc" ]
deps += [ "//components/services/quarantine/public/cpp:features" ] deps += [ "//components/services/quarantine/public/cpp:features" ]
} }
if (is_mac) { if (is_mac) {
sources += [ "quarantine_mac.mm" ]
frameworks = [ frameworks = [
"Carbon.framework", "Carbon.framework",
"Foundation.framework", "Foundation.framework",
...@@ -50,10 +43,6 @@ source_set("common") { ...@@ -50,10 +43,6 @@ source_set("common") {
sources = [ sources = [
"common.cc", "common.cc",
"common.h", "common.h",
"common_mac.h",
"common_mac.mm",
"common_win.cc",
"common_win.h",
] ]
deps = [ deps = [
...@@ -61,7 +50,18 @@ source_set("common") { ...@@ -61,7 +50,18 @@ source_set("common") {
"//url", "//url",
] ]
if (is_win) {
sources += [
"common_win.cc",
"common_win.h",
]
}
if (is_mac) { if (is_mac) {
sources += [
"common_mac.h",
"common_mac.mm",
]
frameworks = [ frameworks = [
"Carbon.framework", "Carbon.framework",
"Foundation.framework", "Foundation.framework",
...@@ -75,8 +75,6 @@ source_set("test_support") { ...@@ -75,8 +75,6 @@ source_set("test_support") {
sources = [ sources = [
"test_support.cc", "test_support.cc",
"test_support.h", "test_support.h",
"test_support_mac.mm",
"test_support_win.cc",
] ]
deps = [ deps = [
...@@ -86,7 +84,12 @@ source_set("test_support") { ...@@ -86,7 +84,12 @@ source_set("test_support") {
"//url", "//url",
] ]
if (is_win) {
sources += [ "test_support_win.cc" ]
}
if (is_mac) { if (is_mac) {
sources += [ "test_support_mac.mm" ]
frameworks = [ frameworks = [
"Carbon.framework", "Carbon.framework",
"Foundation.framework", "Foundation.framework",
...@@ -99,9 +102,7 @@ source_set("unit_tests") { ...@@ -99,9 +102,7 @@ source_set("unit_tests") {
sources = [ sources = [
"common_unittests.cc", "common_unittests.cc",
"quarantine_mac_unittest.mm",
"quarantine_service_unittest.cc", "quarantine_service_unittest.cc",
"quarantine_win_unittest.cc",
] ]
# Chromecasts do not have extended attributes enabled; even if it were # Chromecasts do not have extended attributes enabled; even if it were
...@@ -126,10 +127,12 @@ source_set("unit_tests") { ...@@ -126,10 +127,12 @@ source_set("unit_tests") {
] ]
if (is_win) { if (is_win) {
sources += [ "quarantine_win_unittest.cc" ]
deps += [ "//components/services/quarantine/public/cpp:features" ] deps += [ "//components/services/quarantine/public/cpp:features" ]
} }
if (is_mac) { if (is_mac) {
sources += [ "quarantine_mac_unittest.mm" ]
frameworks = [ frameworks = [
"Carbon.framework", "Carbon.framework",
"Foundation.framework", "Foundation.framework",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment