Skip to content

Commit

Permalink
Reformat all gn files in /components/
Browse files Browse the repository at this point in the history
`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.

Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.

This CL was uploaded by me.

Bug: 1041419
Change-Id: I4dc096337fe543a8ff2d027d95323f521989000f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007768
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732860}
  • Loading branch information
nico authored and Commit Bot committed Jan 17, 2020
1 parent 55ebeca commit fb2cf66
Show file tree
Hide file tree
Showing 79 changed files with 148 additions and 435 deletions.
8 changes: 2 additions & 6 deletions components/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ if (is_ios) {
"$root_out_dir/components_tests_resources.pak",
"$root_out_dir/ui_test.pak",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}

Expand All @@ -48,9 +46,7 @@ if (is_ios) {
# test target if convenient.
test("components_unittests") {
if (is_android || is_linux || is_mac || is_win) {
data = [
"test/data/",
]
data = [ "test/data/" ]
}

# Add only ":unit_tests" dependencies here. If your tests have dependencies
Expand Down
8 changes: 2 additions & 6 deletions components/about_ui/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import("//build/config/android/rules.gni")

generate_jni("about_ui_jni_headers") {
sources = [
"java/src/org/chromium/components/aboutui/CreditUtils.java",
]
sources = [ "java/src/org/chromium/components/aboutui/CreditUtils.java" ]
}

android_library("aboutui_java") {
sources = [
"java/src/org/chromium/components/aboutui/CreditUtils.java",
]
sources = [ "java/src/org/chromium/components/aboutui/CreditUtils.java" ]
deps = [
"//base:base_java",
"//base:jni_java",
Expand Down
22 changes: 6 additions & 16 deletions components/autofill/core/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,7 @@ jumbo_static_library("test_support") {
"webdata/mock_autofill_webdata_backend.h",
]

public_deps = [
":browser",
]
public_deps = [ ":browser" ]

deps = [
":autofill_address_rewriter_resources",
Expand Down Expand Up @@ -530,10 +528,8 @@ bundle_data("unit_tests_bundle_data") {
"//components/test/data/autofill/merge/output/singlemerge.out",
"//components/test/data/autofill/merge/output/validation.out",
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}" ]
}

source_set("unit_tests") {
Expand Down Expand Up @@ -699,9 +695,7 @@ source_set("unit_tests") {
}

fuzzer_test("form_structure_fuzzer") {
sources = [
"form_structure_fuzzer.cc",
]
sources = [ "form_structure_fuzzer.cc" ]
deps = [
# TODO(crbug.com/896313): Reduce the dependency on "browser".
":browser",
Expand All @@ -714,9 +708,7 @@ fuzzer_test("form_structure_fuzzer") {

if (use_libfuzzer) {
fuzzer_test("form_structure_process_query_response_fuzzer") {
sources = [
"form_structure_process_query_response_fuzzer.cc",
]
sources = [ "form_structure_process_query_response_fuzzer.cc" ]
deps = [
# TODO(crbug.com/896313): Reduce the dependency on "browser".
":browser",
Expand All @@ -729,9 +721,7 @@ if (use_libfuzzer) {
}

fuzzer_test("autofill_phone_number_i18n_fuzzer") {
sources = [
"geo/phone_number_i18n_fuzzer.cc",
]
sources = [ "geo/phone_number_i18n_fuzzer.cc" ]

deps = [
# TODO(crbug.com/896313): Reduce the dependency on "browser".
Expand Down
4 changes: 1 addition & 3 deletions components/autofill/core/browser/proto/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ static_library("legacy_proto_bridge") {
"legacy_proto_bridge.cc",
"legacy_proto_bridge.h",
]
deps = [
":proto",
]
deps = [ ":proto" ]
}
16 changes: 4 additions & 12 deletions components/browser_watcher/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import("//third_party/protobuf/proto_library.gni")

if (is_win) {
proto_library("stability_report_proto") {
sources = [
"stability_report.proto",
]
sources = [ "stability_report.proto" ]
}

static_library("browser_watcher") {
Expand All @@ -22,9 +20,7 @@ if (is_win) {
"window_hang_monitor_win.cc",
"window_hang_monitor_win.h",
]
deps = [
"//base",
]
deps = [ "//base" ]
}

static_library("browser_watcher_client") {
Expand Down Expand Up @@ -158,19 +154,15 @@ if (is_win) {
}

executable("dump_stability") {
sources = [
"dump_stability_report_main_win.cc",
]
sources = [ "dump_stability_report_main_win.cc" ]
deps = [
":stability_report_proto",
"//base",
]
}

executable("fetch_system_session_events") {
sources = [
"fetch_system_session_events_main_win.cc",
]
sources = [ "fetch_system_session_events_main_win.cc" ]
deps = [
":postmortem_stability",
"//base",
Expand Down
8 changes: 2 additions & 6 deletions components/cast_channel/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ static_library("cast_channel") {
"//services/data_decoder/public/cpp",
"//third_party/openscreen/src/cast/common/channel/proto:channel_proto",
]
public_deps = [
"//services/network/public/mojom",
]
public_deps = [ "//services/network/public/mojom" ]
}

static_library("test_support") {
Expand Down Expand Up @@ -102,9 +100,7 @@ source_set("unit_tests") {
}

fuzzer_test("cast_message_fuzzer") {
sources = [
"cast_message_fuzzer.cc",
]
sources = [ "cast_message_fuzzer.cc" ]
deps = [
":test_support",
"//base",
Expand Down
4 changes: 1 addition & 3 deletions components/content_capture/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ source_set("browser") {

source_set("unit_tests") {
testonly = true
sources = [
"content_capture_receiver_test.cc",
]
sources = [ "content_capture_receiver_test.cc" ]

deps = [
":browser",
Expand Down
24 changes: 6 additions & 18 deletions components/content_capture/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ source_set("common") {
}

mojom("mojo_interfaces") {
sources = [
"content_capture.mojom",
]
sources = [ "content_capture.mojom" ]

public_deps = [
":mojo_types",
Expand All @@ -31,9 +29,7 @@ mojom("mojo_interfaces") {
}

mojom("mojo_types") {
sources = [
"content_capture_data.mojom",
]
sources = [ "content_capture_data.mojom" ]

public_deps = [
"//mojo/public/mojom/base",
Expand All @@ -43,24 +39,16 @@ mojom("mojo_types") {

mojom("mojo_test_types") {
testonly = true
sources = [
"traits_test_service.test-mojom",
]
sources = [ "traits_test_service.test-mojom" ]

public_deps = [
":mojo_types",
]
public_deps = [ ":mojo_types" ]
}

source_set("unit_tests") {
testonly = true
sources = [
"content_capture_mojom_traits_unittest.cc",
]
sources = [ "content_capture_mojom_traits_unittest.cc" ]

public_deps = [
":mojo_test_types",
]
public_deps = [ ":mojo_test_types" ]

deps = [
":common",
Expand Down
16 changes: 4 additions & 12 deletions components/content_settings/core/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jumbo_static_library("common") {

configs += [ "//build/config/compiler:wexit_time_destructors" ]

public_deps = [
":features",
]
public_deps = [ ":features" ]

deps = [
"//base",
Expand Down Expand Up @@ -60,13 +58,9 @@ jumbo_source_set("unit_tests") {

mojom("mojo_bindings") {
generate_java = true
sources = [
"content_settings.mojom",
]
sources = [ "content_settings.mojom" ]

public_deps = [
"//mojo/public/mojom/base",
]
public_deps = [ "//mojo/public/mojom/base" ]
}

component("features") {
Expand All @@ -79,7 +73,5 @@ component("features") {
"features.h",
]

deps = [
"//base",
]
deps = [ "//base" ]
}
4 changes: 1 addition & 3 deletions components/content_settings/core/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jumbo_static_library("test_support") {
"content_settings_test_utils.h",
]

public_deps = [
"//components/content_settings/core/browser",
]
public_deps = [ "//components/content_settings/core/browser" ]
deps = [
"//base",
"//components/content_settings/core/common",
Expand Down
4 changes: 1 addition & 3 deletions components/data_use_measurement/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ static_library("ascriber") {
}

source_set("unit_tests") {
sources = [
"data_use_measurement_unittest.cc",
]
sources = [ "data_use_measurement_unittest.cc" ]
testonly = true
deps = [
":ascriber",
Expand Down
8 changes: 2 additions & 6 deletions components/download/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ group("unit_tests") {
]
}

data_deps = [
":components_unittests_gtest_filter",
]
data_deps = [ ":components_unittests_gtest_filter" ]
}

source_set("components_unittests_gtest_filter") {
testonly = true

data = [
"components_unittests.filter",
]
data = [ "components_unittests.filter" ]
}
4 changes: 1 addition & 3 deletions components/download/content/factory/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ source_set("factory") {
"navigation_monitor_factory.h",
]

public_deps = [
"//components/download/public/background_service:public",
]
public_deps = [ "//components/download/public/background_service:public" ]

deps = [
"//base",
Expand Down
4 changes: 1 addition & 3 deletions components/download/content/internal/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ source_set("internal") {
source_set("unit_tests") {
testonly = true

sources = [
"download_driver_impl_unittest.cc",
]
sources = [ "download_driver_impl_unittest.cc" ]

deps = [
":internal",
Expand Down
8 changes: 2 additions & 6 deletions components/download/content/public/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ source_set("public") {
"download_navigation_observer.h",
]

public_deps = [
"//base",
]
public_deps = [ "//base" ]

deps = [
"//components/download/public/background_service:public",
Expand All @@ -28,9 +26,7 @@ source_set("public") {
source_set("unit_tests") {
testonly = true

sources = [
"all_download_item_notifier_unittest.cc",
]
sources = [ "all_download_item_notifier_unittest.cc" ]

deps = [
":public",
Expand Down
8 changes: 2 additions & 6 deletions components/download/internal/background_service/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ static_library("internal") {

if (is_android) {
android_library("internal_java") {
sources = [
"android/java/src/org/chromium/components/download/internal/BatteryStatusListenerAndroid.java",
]
sources = [ "android/java/src/org/chromium/components/download/internal/BatteryStatusListenerAndroid.java" ]

deps = [
"//base:base_java",
Expand All @@ -124,9 +122,7 @@ if (is_android) {

generate_jni("jni_headers") {
visibility = [ ":*" ]
sources = [
"android/java/src/org/chromium/components/download/internal/BatteryStatusListenerAndroid.java",
]
sources = [ "android/java/src/org/chromium/components/download/internal/BatteryStatusListenerAndroid.java" ]
}
}

Expand Down
Loading

0 comments on commit fb2cf66

Please sign in to comment.