Skip to content

Commit

Permalink
[native messaging][chromeos] Remove unused policy handler
Browse files Browse the repository at this point in the history
Also add comments explaining exclusion of tests and merge inclusion of
removable_storage_provider_linux.cc on Linux and Lacros.

Bug: 1293504
Change-Id: I79c797f8132f9c3452ca23ca829273411bf19d1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4277801
Reviewed-by: Devlin Cronin <[email protected]>
Reviewed-by: Marc Treib <[email protected]>
Auto-Submit: David Dorwin <[email protected]>
Commit-Queue: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1111483}
  • Loading branch information
ddorwin authored and Chromium LUCI CQ committed Mar 1, 2023
1 parent d6e0a59 commit 004351d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 9 additions & 4 deletions chrome/browser/extensions/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ static_library("extensions") {
"api/messaging/native_message_port.h",
"api/messaging/native_messaging_host_manifest.cc",
"api/messaging/native_messaging_host_manifest.h",
"api/messaging/native_messaging_policy_handler.cc",
"api/messaging/native_messaging_policy_handler.h",
"api/metrics_private/chrome_metrics_private_delegate.cc",
"api/metrics_private/chrome_metrics_private_delegate.h",
"api/networking_private/networking_private_ui_delegate_factory_impl.cc",
Expand Down Expand Up @@ -727,6 +725,14 @@ static_library("extensions") {
"window_controller_list_observer.h",
]

# Chrome OS does not support Native Messaging policies.
if (!is_chromeos) {
sources += [
"api/messaging/native_messaging_policy_handler.cc",
"api/messaging/native_messaging_policy_handler.h",
]
}

configs += [
"//build/config:precompiled_headers",
"//build/config/compiler:wexit_time_destructors",
Expand Down Expand Up @@ -1237,7 +1243,6 @@ static_library("extensions") {
"api/image_writer_private/image_writer_controller_lacros.cc",
"api/image_writer_private/image_writer_controller_lacros.h",
"api/image_writer_private/operation_nonchromeos.cc",
"api/image_writer_private/removable_storage_provider_linux.cc",
"api/messaging/native_message_host_lacros.cc",
"api/quick_unlock_private/quick_unlock_private_api_lacros.cc",
"api/quick_unlock_private/quick_unlock_private_api_lacros.h",
Expand Down Expand Up @@ -1278,7 +1283,7 @@ static_library("extensions") {
]
}

if (is_linux) {
if (is_linux || is_chromeos_lacros) {
sources +=
[ "api/image_writer_private/removable_storage_provider_linux.cc" ]
}
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/policy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ source_set("browser_tests") {
if (!is_android && !is_chromeos) {
sources += [
"test/hardware_acceleration_mode_enabled_browsertest.cc",

# Chrome OS does not support this policy.
"test/native_messaging_policy_browsertest.cc",
]
}
Expand Down
4 changes: 4 additions & 0 deletions chrome/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8283,6 +8283,10 @@ test("unit_tests") {

deps += [ "//components/enterprise:test_support" ]
}

# The Chrome OS implementation of Native Messaging does not use the source
# files corresponding to these tests.
# Fuchsia does not support Native Messaging.
if (!is_chromeos && !is_fuchsia) {
sources += [
"../browser/extensions/api/messaging/native_message_process_host_unittest.cc",
Expand Down

0 comments on commit 004351d

Please sign in to comment.