Skip to content

Commit

Permalink
Reformat all gn files in /chromecast.
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 git cl split.

R=spang@chromium.org

Bug: 1041419
Change-Id: I9aef9593ceca62914bda388e4c3b24cb6d76db8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1998258
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732137}
  • Loading branch information
nico authored and Commit Bot committed Jan 15, 2020
1 parent 948685b commit 89bac3c
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 222 deletions.
33 changes: 9 additions & 24 deletions chromecast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ declare_args() {
# Depends on all non-test targets that should be built by the Chromecast
# internal build infrastructure.
group("all") {
deps = [
"//chromecast/build:archive",
]
deps = [ "//chromecast/build:archive" ]
if (is_android && chromecast_branding == "public") {
deps += [ ":cast_shell_apk" ]
}
Expand Down Expand Up @@ -447,15 +445,11 @@ test("cast_shell_browsertests") {
"//chromecast/browser:browsertests",
]

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

group("cast_shell_lib") {
data_deps = [
":cast_shell_pak",
]
data_deps = [ ":cast_shell_pak" ]

deps = [
"//chromecast/app",
Expand All @@ -471,9 +465,7 @@ group("cast_shell_lib") {
}

cast_executable("cast_shell") {
sources = [
"app/cast_main.cc",
]
sources = [ "app/cast_main.cc" ]

deps = [
":cast_shell_lib",
Expand Down Expand Up @@ -546,12 +538,9 @@ foreach(locale, cast_locales) {
repack("_cast_repack_${locale}") {
visibility = [ ":chromecast_locales_pak" ]
output = "$root_out_dir/chromecast_locales/${locale}.pak"
sources = [
"$root_gen_dir/chromecast/app/chromecast_settings_${locale}.pak",
]
deps = [
"//chromecast/app:chromecast_settings",
]
sources =
[ "$root_gen_dir/chromecast/app/chromecast_settings_${locale}.pak" ]
deps = [ "//chromecast/app:chromecast_settings" ]

if (chromecast_branding != "public") {
sources += [
Expand Down Expand Up @@ -609,9 +598,7 @@ if (is_android) {
android_assets("cast_shell_apk_assets") {
assert(v8_use_external_startup_data)

sources = [
"$root_out_dir/assets/cast_shell.pak",
]
sources = [ "$root_out_dir/assets/cast_shell.pak" ]

deps = [
":cast_shell_apk_locale_assets",
Expand All @@ -631,9 +618,7 @@ if (is_android) {
renaming_destinations += [ "stored-locales/${locale}.pak" ]
}

deps = [
":chromecast_locales_pak",
]
deps = [ ":chromecast_locales_pak" ]

treat_as_locale_paks = true
disable_compression = true
Expand Down
8 changes: 2 additions & 6 deletions chromecast/activity/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
import("//chromecast/chromecast.gni")

cast_source_set("activity") {
sources = [
"queryable_data_host.h",
]
sources = [ "queryable_data_host.h" ]

deps = [
"//base",
]
deps = [ "//base" ]
}
20 changes: 5 additions & 15 deletions chromecast/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ cast_source_set("cast_crash_client") {

cast_source_set("test_support") {
testonly = true
sources = [
"cast_test_launcher.cc",
]
sources = [ "cast_test_launcher.cc" ]

deps = [
":app",
Expand All @@ -89,9 +87,7 @@ cast_source_set("test_support") {

cast_source_set("unittests") {
testonly = true
sources = [
"linux/cast_crash_reporter_client_unittest.cc",
]
sources = [ "linux/cast_crash_reporter_client_unittest.cc" ]

deps = [
"//base",
Expand Down Expand Up @@ -125,16 +121,12 @@ grit("chromecast_settings") {
source = "//chromecast/app/resources/chromecast_settings.grd"
resource_ids = "//chromecast/app/resources/resource_ids"

outputs = [
"grit/chromecast_settings.h",
]
outputs = [ "grit/chromecast_settings.h" ]
foreach(locale, cast_locales) {
outputs += [ "chromecast_settings_${locale}.pak" ]
}

deps = [
":verify_cast_locales",
]
deps = [ ":verify_cast_locales" ]
}

# This target ensures that Chromecast developers are notified when locales
Expand All @@ -154,7 +146,5 @@ action("verify_cast_locales") {

args += cast_locales

outputs = [
stamp_file,
]
outputs = [ stamp_file ]
}
52 changes: 13 additions & 39 deletions chromecast/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ cast_source_set("chromecast_switches") {
"chromecast_switches.h",
]

deps = [
"//base",
]
deps = [ "//base" ]
}

# command line initialization code for shared libs
Expand Down Expand Up @@ -193,9 +191,7 @@ test("cast_base_unittests") {

# Declares CreateSysInfo() without defining the implementation (see below).
cast_source_set("cast_sys_info_util") {
public = [
"cast_sys_info_util.h",
]
public = [ "cast_sys_info_util.h" ]
}

# Defines a CastSysInfoDummy suitable for use in tests, and public builds.
Expand All @@ -212,15 +208,9 @@ cast_source_set("dummy_cast_sys_info") {

# Links a CreateSysInfo() implementation that returns CastSysInfoDummy.
cast_source_set("dummy_create_sys_info") {
sources = [
"cast_sys_info_util_simple.cc",
]
deps = [
":dummy_cast_sys_info",
]
public_deps = [
":cast_sys_info_util",
]
sources = [ "cast_sys_info_util_simple.cc" ]
deps = [ ":dummy_cast_sys_info" ]
public_deps = [ ":cast_sys_info_util" ]
}

# Links the default CreateSysInfo() implementation for Android.
Expand All @@ -233,9 +223,7 @@ if (is_android) {
"//chromecast/browser:jni_headers",
"//chromecast/public",
]
public_deps = [
":cast_sys_info_util",
]
public_deps = [ ":cast_sys_info_util" ]
sources = [
"cast_sys_info_android.cc",
"cast_sys_info_android.h",
Expand All @@ -252,9 +240,7 @@ if (is_android) {
# Target for OEM partners to override sys_info shared library, i.e.
# libcast_sys_info_1.0.so.
cast_shared_library("libcast_sys_info_1.0") {
sources = [
"cast_sys_info_shlib.cc",
]
sources = [ "cast_sys_info_shlib.cc" ]

deps = [
":cast_sys_info_util",
Expand All @@ -265,36 +251,26 @@ if (is_android) {

# Links a CreateSysInfo() that loads libcast_sys_info_1.0.so.
cast_source_set("shlib_create_sys_info") {
sources = [
"cast_sys_info_util_shlib.cc",
]
sources = [ "cast_sys_info_util_shlib.cc" ]

deps = [
":libcast_sys_info_1.0",
"//base",
"//chromecast/public",
]

public_deps = [
":cast_sys_info_util",
]
public_deps = [ ":cast_sys_info_util" ]
}
} # is_android

# Links the default CreateSysInfo() for this build configuration.
group("default_create_sys_info") {
if (is_android) {
public_deps = [
":android_create_sys_info",
]
public_deps = [ ":android_create_sys_info" ]
} else if (chromecast_branding == "public") {
public_deps = [
":dummy_create_sys_info",
]
public_deps = [ ":dummy_create_sys_info" ]
} else {
public_deps = [
":shlib_create_sys_info",
]
public_deps = [ ":shlib_create_sys_info" ]
}
}

Expand All @@ -313,9 +289,7 @@ process_version("cast_version") {
template_file = "version.h.in"
output = "$target_gen_dir/version.h"

sources = [
"//chrome/VERSION",
]
sources = [ "//chrome/VERSION" ]
extra_args = [
"-e",
"VERSION_FULL=\"%s.%s.%s.%s\"%(MAJOR,MINOR,BUILD,PATCH)",
Expand Down
8 changes: 2 additions & 6 deletions chromecast/base/component/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ cast_source_set("component") {
"component_internal.h",
]

deps = [
"//base",
]
deps = [ "//base" ]
}

test("cast_component_unittests") {
sources = [
"component_unittest.cc",
]
sources = [ "component_unittest.cc" ]

deps = [
":component",
Expand Down
8 changes: 2 additions & 6 deletions chromecast/base/metrics/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ cast_source_set("metrics") {
"grouped_histogram.h",
]

deps = [
"//base",
]
deps = [ "//base" ]
}

cast_source_set("test_support") {
Expand All @@ -26,9 +24,7 @@ cast_source_set("test_support") {
"mock_cast_metrics_helper.h",
]

public_deps = [
":metrics",
]
public_deps = [ ":metrics" ]

deps = [
"//base",
Expand Down
32 changes: 8 additions & 24 deletions chromecast/bindings/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ if (is_fuchsia) {
}

source_set("named_message_port_connector_resources") {
data = [
"resources/named_message_port_connector.js",
]
data = [ "resources/named_message_port_connector.js" ]
}

grit("bindings_resources") {
Expand All @@ -28,12 +26,8 @@ source_set("bindings_manager") {
"bindings_manager.cc",
"bindings_manager.h",
]
deps = [
"//base",
]
public_deps = [
"//mojo/public/cpp/bindings",
]
deps = [ "//base" ]
public_deps = [ "//mojo/public/cpp/bindings" ]
}

if (is_fuchsia) {
Expand All @@ -50,9 +44,7 @@ if (is_fuchsia) {
"//fuchsia/base:message_port",
]

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

Expand All @@ -71,26 +63,18 @@ if (is_linux || is_android) {
"//third_party/blink/public/common",
]

data = [
"named_message_port_connector.js",
]
data = [ "named_message_port_connector.js" ]

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

source_set("browsertests_cast") {
testonly = true
sources = [
"bindings_manager_cast_browsertest.cc",
]
sources = [ "bindings_manager_cast_browsertest.cc" ]

defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

data = [
"//chromecast/bindings/testdata",
]
data = [ "//chromecast/bindings/testdata" ]

deps = [
"//base",
Expand Down
20 changes: 5 additions & 15 deletions chromecast/build/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,16 @@ if (is_android) {
artifact_type_suffix = "$cast_build_incremental-$target_cpu"

copy("archive_public_cast_apk") {
sources = [
"$root_out_dir/apks/CastShell.apk",
]
outputs = [
"$root_out_dir/archive/CastShell-$artifact_type_suffix.apk",
]
deps = [
"//chromecast:cast_shell_apk",
]
sources = [ "$root_out_dir/apks/CastShell.apk" ]
outputs = [ "$root_out_dir/archive/CastShell-$artifact_type_suffix.apk" ]
deps = [ "//chromecast:cast_shell_apk" ]
}
}

group("archive") {
if (chromecast_branding == "internal") {
deps = [
"//chromecast/internal/build:archive",
]
deps = [ "//chromecast/internal/build:archive" ]
} else if (is_android) {
deps = [
":archive_public_cast_apk",
]
deps = [ ":archive_public_cast_apk" ]
}
}
Loading

0 comments on commit 89bac3c

Please sign in to comment.