Skip to content

Commit

Permalink
CodeHealth: Enable gn check for //remoting/host/setup
Browse files Browse the repository at this point in the history
Split security_descriptor and elevated_native_messaging_host to separate
targets to prevent the dependency cycle:
//remoting/host/win:remoting_core ->
//remoting/host/setup:setup ->
//remoting/host/setup:common ->
//remoting/host/win:remoting_core

Bug: 1159014
Change-Id: Iee5896dc673304bb160230e3d600762e449d6a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2896988
Reviewed-by: Joe Downing <joedow@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Anastasiia N <anastasiian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#884351}
  • Loading branch information
Anastasiia N authored and Chromium LUCI CQ committed May 19, 2021
1 parent ab5ec25 commit 6ba99c1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ no_check_targets = [
"//remoting/host/it2me:*", # 18 errors
"//remoting/host/mac:*", # 49 errors
"//remoting/host/security_key:*", # 68 errors
"//remoting/host/setup:*", # 9 errors
"//remoting/host/win:*", # 43 errors
"//remoting/ios/app/settings:*", # 6 errors
"//remoting/ios/app:*", # 9 errors
Expand Down
15 changes: 13 additions & 2 deletions remoting/host/setup/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ source_set("common") {

deps = [
"//base",
"//extensions/browser/api/messaging:native_messaging",
"//google_apis",
"//mojo/core/embedder",
"//remoting/base:authorization",
"//remoting/base:base",
"//remoting/host:common",
"//remoting/host/native_messaging",
"//remoting/protocol:protocol",
"//services/network/public/cpp",
"//services/network/public/mojom",
]
Expand All @@ -52,7 +55,11 @@ source_set("common") {
"daemon_controller_delegate_mac.h",
"daemon_controller_delegate_mac.mm",
]
deps += [ "//remoting/host/mac:permission_checking" ]
deps += [
"//remoting/host/mac:permission_checking",
"//remoting/resources:strings_grit",
"//ui/base:base",
]
}

if (is_apple) {
Expand All @@ -64,6 +71,10 @@ source_set("common") {
"daemon_controller_delegate_win.cc",
"daemon_controller_delegate_win.h",
]
deps += [ "//remoting/host/win:remoting_lib_idl" ]
deps += [
"//remoting/host/win:elevated_native_messaging_host",
"//remoting/host/win:remoting_lib_idl",
"//remoting/host/win:security_descriptor",
]
}
}
29 changes: 22 additions & 7 deletions remoting/host/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ windows_manifest("dpi_aware_uiaccess_require_admin_exe_manifest") {
]
}

source_set("security_descriptor") {
sources = [
"security_descriptor.cc",
"security_descriptor.h",
]
deps = [ "//remoting/base" ]
}

source_set("win") {
sources = [
"audio_volume_filter_win.cc",
Expand All @@ -104,8 +112,6 @@ source_set("win") {
"rdp_client.h",
"rdp_client_window.cc",
"rdp_client_window.h",
"security_descriptor.cc",
"security_descriptor.h",
"session_action_executor.cc",
"session_action_executor.h",
"session_desktop_environment.cc",
Expand Down Expand Up @@ -136,6 +142,7 @@ source_set("win") {

defines = [ "WEBRTC_CHROMIUM_BUILD" ]

public_deps = [ ":security_descriptor" ]
deps = [
"//base:i18n",
"//components/policy/core/common",
Expand Down Expand Up @@ -164,8 +171,6 @@ source_set("unit_tests") {
testonly = true

sources = [
"elevated_native_messaging_host.cc",
"elevated_native_messaging_host.h",
"event_trace_data.cc",
"event_trace_data.h",
"event_trace_data_unittest.cc",
Expand All @@ -176,6 +181,7 @@ source_set("unit_tests") {
]

deps = [
":elevated_native_messaging_host",
"//ipc",
"//remoting/host:common",
"//remoting/host:test_support",
Expand Down Expand Up @@ -324,6 +330,17 @@ executable("remoting_me2me_host") {
}
}

source_set("elevated_native_messaging_host") {
sources = [
"elevated_native_messaging_host.cc",
"elevated_native_messaging_host.h",
]
deps = [
"//base",
"//remoting/host/native_messaging",
]
}

shared_library("remoting_core") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

Expand Down Expand Up @@ -373,8 +390,6 @@ shared_library("remoting_core") {
"chromoting_module.h",
"core.cc",
"core.h",
"elevated_native_messaging_host.cc",
"elevated_native_messaging_host.h",
"etw_trace_consumer.cc",
"etw_trace_controller.cc",
"etw_trace_controller.h",
Expand Down Expand Up @@ -402,7 +417,7 @@ shared_library("remoting_core") {
"unprivileged_process_delegate.h",
"wts_session_process_delegate.h",
]

public_deps = [ ":elevated_native_messaging_host" ]
deps = [
":messages",
":remoting_lib_idl",
Expand Down

0 comments on commit 6ba99c1

Please sign in to comment.