summaryrefslogtreecommitdiff
path: root/chromium/chrome/updater/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/updater/BUILD.gn')
-rw-r--r--chromium/chrome/updater/BUILD.gn103
1 files changed, 63 insertions, 40 deletions
diff --git a/chromium/chrome/updater/BUILD.gn b/chromium/chrome/updater/BUILD.gn
index 95899853e12..1dcc87a4dce 100644
--- a/chromium/chrome/updater/BUILD.gn
+++ b/chromium/chrome/updater/BUILD.gn
@@ -30,6 +30,12 @@ group("updater") {
# Conditional build is needed, otherwise the analyze script on Linux
# requires all targets and it is going to include the targets below.
if (is_win || is_mac) {
+ # This target must only have platform-neutral sources. Generally speaking,
+ # these sources are related to common, cross-platfrom aspects of the code,
+ # such as crash handling, or interfaces to cross platform dependencies from
+ # Chromium. If the sources are in platform-specific directories or their
+ # names contain platform-specific suffixes, they must go into the :lib
+ # target, or to targets in their platform directories.
source_set("base") {
sources = [
"action_handler.h",
@@ -39,17 +45,12 @@ if (is_win || is_mac) {
"crash_client.h",
"crash_reporter.cc",
"crash_reporter.h",
- "external_constants.cc",
- "external_constants.h",
- "external_constants_impl.h",
"patcher.cc",
"patcher.h",
"persisted_data.cc",
"persisted_data.h",
"policy_manager.cc",
"policy_manager.h",
- "prefs.cc",
- "prefs.h",
"registration_data.cc",
"registration_data.h",
"unzipper.cc",
@@ -73,34 +74,36 @@ if (is_win || is_mac) {
"//third_party/zlib/google:zip",
"//url",
]
-
- if (is_mac) {
- sources += [ "external_constants_mac.mm" ]
- }
-
- if (is_win) {
- sources += [
- "external_constants_win.cc",
- "win/group_policy_manager.cc",
- "win/group_policy_manager.h",
- ]
- deps += [ "//chrome/updater/win:constants" ]
- }
}
+ # Use this source set for code which has platform-specific modules.
source_set("lib") {
sources = [
"app/app.cc",
"app/app.h",
+ "app/app_server.cc",
+ "app/app_server.h",
"app/app_uninstall.cc",
"app/app_uninstall.h",
- "app/app_update_all.cc",
- "app/app_update_all.h",
+ "app/app_wake.cc",
+ "app/app_wake.h",
"configurator.cc",
"configurator.h",
+ "dm_cached_policy_info.cc",
+ "dm_cached_policy_info.h",
+ "dm_policy_manager.cc",
+ "dm_policy_manager.h",
+ "dm_storage.cc",
+ "dm_storage.h",
+ "external_constants.cc",
+ "external_constants.h",
+ "external_constants_impl.h",
"installer.cc",
"installer.h",
"lib_util.h",
+ "prefs.cc",
+ "prefs.h",
+ "prefs_impl.h",
"tag.cc",
"tag.h",
"update_apps.h",
@@ -112,33 +115,40 @@ if (is_win || is_mac) {
if (is_mac) {
sources += [
+ "app/server/mac/app_server.h",
+ "app/server/mac/server.h",
+ "app/server/mac/server.mm",
+ "app/server/mac/service_delegate.h",
+ "app/server/mac/service_delegate.mm",
+ "app/server/mac/service_protocol.mm",
+ "app/server/mac/update_service_wrappers.h",
+ "app/server/mac/update_service_wrappers.mm",
+ "dm_storage_mac.mm",
+ "external_constants_mac.mm",
"installer_mac.cc",
"lib_util_mac.mm",
"mac/update_service_out_of_process.h",
"mac/update_service_out_of_process.mm",
- "server/mac/server.h",
- "server/mac/server.mm",
- "server/mac/service_delegate.h",
- "server/mac/service_delegate.mm",
- "server/mac/service_protocol.mm",
- "server/mac/update_service_wrappers.h",
- "server/mac/update_service_wrappers.mm",
+ "prefs_mac.mm",
"update_apps_mac.mm",
]
}
if (is_win) {
sources += [
+ "app/server/win/com_classes.cc",
+ "app/server/win/com_classes.h",
+ "app/server/win/com_classes_legacy.cc",
+ "app/server/win/com_classes_legacy.h",
+ "app/server/win/server.cc",
+ "app/server/win/server.h",
+ "app/server/win/service_main.cc",
+ "app/server/win/service_main.h",
+ "dm_storage_win.cc",
+ "external_constants_win.cc",
"installer_win.cc",
"lib_util_win.cc",
- "server/win/com_classes.cc",
- "server/win/com_classes.h",
- "server/win/com_classes_legacy.cc",
- "server/win/com_classes_legacy.h",
- "server/win/server.cc",
- "server/win/server.h",
- "server/win/service_main.cc",
- "server/win/service_main.h",
+ "prefs_win.cc",
"update_apps_win.cc",
]
}
@@ -147,6 +157,7 @@ if (is_win || is_mac) {
":base",
":version_header",
"//base",
+ "//chrome/updater/protos:omaha_proto",
"//components/crash/core/common:crash_key",
"//components/crx_file:crx_file",
"//components/prefs",
@@ -154,10 +165,11 @@ if (is_win || is_mac) {
"//components/version_info",
"//url",
]
+ public_deps = [ "//components/policy/proto" ]
if (is_win) {
deps += [
- "//chrome/updater/server/win:updater_idl_idl",
+ "//chrome/updater/app/server/win:updater_idl_idl",
"//chrome/updater/win:constants",
"//chrome/updater/win:lib",
]
@@ -165,11 +177,11 @@ if (is_win || is_mac) {
if (is_mac) {
deps += [
+ "//chrome/updater/app/server/mac:protocol",
"//chrome/updater/mac:installer_sources",
"//chrome/updater/mac:network_fetcher_sources",
"//chrome/updater/mac:updater_setup_sources",
"//chrome/updater/mac:xpc_names",
- "//chrome/updater/server/mac:protocol",
]
}
@@ -179,7 +191,7 @@ if (is_win || is_mac) {
if (is_win) {
configs -= [ "//build/config/win:winver" ]
- configs += [ "//chrome/updater/server/win:winver" ]
+ configs += [ "//chrome/updater/app/server/win:winver" ]
}
}
@@ -197,6 +209,10 @@ if (is_win || is_mac) {
"COPYRIGHT=\"updater_copyright\"",
"-e",
"MAC_BUNDLE_IDENTIFIER=\"$mac_updater_bundle_identifier\"",
+ "-e",
+ "BROWSER_NAME=\"$browser_name\"",
+ "-e",
+ "MAC_BROWSER_BUNDLE_IDENTIFIER=\"$mac_browser_bundle_identifier\"",
]
template_file = "updater_version.h.in"
@@ -207,6 +223,9 @@ if (is_win || is_mac) {
testonly = true
sources = [
+ "app/app_server_unittest.cc",
+ "dm_policy_manager_unittest.cc",
+ "dm_storage_unittest.cc",
"external_constants_unittest.cc",
"external_constants_unittest.h",
"lib_util_unittest.cc",
@@ -219,6 +238,7 @@ if (is_win || is_mac) {
"test/integration_tests.h",
"unittest_util.cc",
"unittest_util.h",
+ "unittest_util_unittest.cc",
"updater_unittest.cc",
]
@@ -238,11 +258,12 @@ if (is_win || is_mac) {
"//url",
]
+ public_deps = [ "//chrome/updater/protos:omaha_proto" ]
+
if (is_win) {
sources += [
"external_constants_win_unittest.cc",
"test/integration_tests_win.cc",
- "win/group_policy_manager_unittest.cc",
]
deps += [
@@ -259,18 +280,20 @@ if (is_win || is_mac) {
if (is_mac) {
sources += [
"external_constants_mac_unittest.mm",
+ "mac/scoped_xpc_service_mock.h",
+ "mac/scoped_xpc_service_mock.mm",
"mac/update_service_out_of_process_test.mm",
"test/integration_tests_mac.mm",
]
deps += [
"//chrome/common/mac:launchd",
+ "//chrome/updater/app/server/mac:protocol",
"//chrome/updater/mac:enterprise_tests",
"//chrome/updater/mac:updater_bundle",
"//chrome/updater/mac:updater_setup_tests",
"//chrome/updater/mac:updater_tests",
"//chrome/updater/mac:xpc_names",
- "//chrome/updater/server/mac:protocol",
"//third_party/ocmock",
]