summaryrefslogtreecommitdiff
path: root/chromium/chrome/updater
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/updater')
-rw-r--r--chromium/chrome/updater/BUILD.gn103
-rw-r--r--chromium/chrome/updater/app/server/mac/BUILD.gn (renamed from chromium/chrome/updater/server/mac/BUILD.gn)0
-rw-r--r--chromium/chrome/updater/app/server/win/BUILD.gn (renamed from chromium/chrome/updater/server/win/BUILD.gn)0
-rw-r--r--chromium/chrome/updater/branding.gni4
-rw-r--r--chromium/chrome/updater/mac/BUILD.gn4
-rw-r--r--chromium/chrome/updater/protos/BUILD.gn25
-rw-r--r--chromium/chrome/updater/test/test_app/BUILD.gn12
-rw-r--r--chromium/chrome/updater/win/BUILD.gn56
-rw-r--r--chromium/chrome/updater/win/test/BUILD.gn2
-rw-r--r--chromium/chrome/updater/win/ui/BUILD.gn2
10 files changed, 124 insertions, 84 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",
]
diff --git a/chromium/chrome/updater/server/mac/BUILD.gn b/chromium/chrome/updater/app/server/mac/BUILD.gn
index 143d98ac27f..143d98ac27f 100644
--- a/chromium/chrome/updater/server/mac/BUILD.gn
+++ b/chromium/chrome/updater/app/server/mac/BUILD.gn
diff --git a/chromium/chrome/updater/server/win/BUILD.gn b/chromium/chrome/updater/app/server/win/BUILD.gn
index c3f5877a34b..c3f5877a34b 100644
--- a/chromium/chrome/updater/server/win/BUILD.gn
+++ b/chromium/chrome/updater/app/server/win/BUILD.gn
diff --git a/chromium/chrome/updater/branding.gni b/chromium/chrome/updater/branding.gni
index 98503f3885a..01379deef59 100644
--- a/chromium/chrome/updater/branding.gni
+++ b/chromium/chrome/updater/branding.gni
@@ -8,14 +8,18 @@ if (is_chrome_branded) {
updater_company_full_name = "Google LLC"
updater_company_short_name = "Google"
updater_product_full_name = "GoogleUpdater"
+ browser_name = "Chrome"
updater_copyright =
"Copyright 2020 The Chromium Authors. All rights reserved."
mac_updater_bundle_identifier = "com.google.GoogleUpdater"
+ mac_browser_bundle_identifier = "com.google.Chrome"
} else {
updater_company_full_name = "Chromium Authors"
updater_company_short_name = "Chromium"
updater_product_full_name = "ChromiumUpdater"
+ browser_name = "Chromium"
updater_copyright =
"Copyright 2020 The Chromium Authors. All rights reserved."
mac_updater_bundle_identifier = "org.chromium.ChromiumUpdater"
+ mac_browser_bundle_identifier = "org.chromium.Chromium"
}
diff --git a/chromium/chrome/updater/mac/BUILD.gn b/chromium/chrome/updater/mac/BUILD.gn
index fec4d476863..8f3e8c7991e 100644
--- a/chromium/chrome/updater/mac/BUILD.gn
+++ b/chromium/chrome/updater/mac/BUILD.gn
@@ -104,10 +104,10 @@ source_set("updater_setup_sources") {
source_set("install_app") {
sources = [
+ "setup/app_swap.cc",
+ "setup/app_swap.h",
"setup/install_app.cc",
"setup/install_app.h",
- "setup/swap_app.cc",
- "setup/swap_app.h",
]
deps = [
diff --git a/chromium/chrome/updater/protos/BUILD.gn b/chromium/chrome/updater/protos/BUILD.gn
new file mode 100644
index 00000000000..c035f2c0f47
--- /dev/null
+++ b/chromium/chrome/updater/protos/BUILD.gn
@@ -0,0 +1,25 @@
+# Copyright 2020 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//third_party/protobuf/proto_library.gni")
+
+# This wrapper with empty |sources| is required to add "protobuf_config" as
+# |all_dependent_configs|, in order to set proper |include_dirs| and |defines|.
+# A "proto_library" target cannot set |all_dependent_configs| variable.
+group("omaha_proto") {
+ all_dependent_configs = [ "//third_party/protobuf:protobuf_config" ]
+ public_deps = [
+ ":proto",
+ "//third_party/protobuf:protobuf_lite",
+ ]
+}
+
+proto_library("proto") {
+ proto_in_dir = "."
+ sources = [
+ "message_set.proto",
+ "omaha_settings.proto",
+ ]
+ visibility = [ ":omaha_proto" ]
+}
diff --git a/chromium/chrome/updater/test/test_app/BUILD.gn b/chromium/chrome/updater/test/test_app/BUILD.gn
index 027300efb8f..96555f308c3 100644
--- a/chromium/chrome/updater/test/test_app/BUILD.gn
+++ b/chromium/chrome/updater/test/test_app/BUILD.gn
@@ -66,10 +66,10 @@ source_set("app_sources") {
if (is_mac) {
sources += [
- "//chrome/updater/server/mac/service_protocol.h",
- "//chrome/updater/server/mac/service_protocol.mm",
- "//chrome/updater/server/mac/update_service_wrappers.h",
- "//chrome/updater/server/mac/update_service_wrappers.mm",
+ "//chrome/updater/app/server/mac/service_protocol.h",
+ "//chrome/updater/app/server/mac/service_protocol.mm",
+ "//chrome/updater/app/server/mac/update_service_wrappers.h",
+ "//chrome/updater/app/server/mac/update_service_wrappers.mm",
]
deps += [ "//chrome/updater/mac:xpc_names" ]
@@ -79,8 +79,8 @@ source_set("app_sources") {
if (is_win) {
deps += [
- "//chrome/updater/server/win:updater_idl_idl",
- "//chrome/updater/win:base",
+ "//chrome/updater/app/server/win:updater_idl_idl",
+ "//chrome/updater/win:lib",
]
}
}
diff --git a/chromium/chrome/updater/win/BUILD.gn b/chromium/chrome/updater/win/BUILD.gn
index 21949b82c2c..9d94ee12040 100644
--- a/chromium/chrome/updater/win/BUILD.gn
+++ b/chromium/chrome/updater/win/BUILD.gn
@@ -52,32 +52,6 @@ process_version_rc_template("version_resources") {
output = "$target_gen_dir/updater_exe.rc"
}
-source_set("base") {
- sources = [
- "scoped_handle.h",
- "task_scheduler.cc",
- "task_scheduler.h",
- "user_info.cc",
- "user_info.h",
- "util.cc",
- "util.h",
- ]
-
- defines = [ "SECURITY_WIN32" ]
-
- deps = [
- ":constants",
- "//base",
- "//chrome/updater:base",
- "//chrome/updater:version_header",
- ]
-
- libs = [
- "secur32.lib",
- "taskschd.lib",
- ]
-}
-
source_set("constants") {
sources = [
"constants.cc",
@@ -93,6 +67,8 @@ source_set("constants") {
source_set("lib") {
sources = [
"action_handler.cc",
+ "group_policy_manager.cc",
+ "group_policy_manager.h",
"net/net_util.cc",
"net/net_util.h",
"net/network.h",
@@ -101,28 +77,41 @@ source_set("lib") {
"net/network_winhttp.cc",
"net/network_winhttp.h",
"net/scoped_hinternet.h",
+ "scoped_handle.h",
"setup/setup.cc",
"setup/setup.h",
"setup/setup_util.cc",
"setup/setup_util.h",
"setup/uninstall.cc",
"setup/uninstall.h",
+ "task_scheduler.cc",
+ "task_scheduler.h",
"update_service_out_of_process.cc",
"update_service_out_of_process.h",
+ "user_info.cc",
+ "user_info.h",
+ "util.cc",
+ "util.h",
]
- libs = [ "winhttp.lib" ]
-
configs -= [ "//build/config/win:winver" ]
- configs += [ "//chrome/updater/server/win:winver" ]
+ configs += [ "//chrome/updater/app/server/win:winver" ]
+
+ defines = [ "SECURITY_WIN32" ]
+
+ libs = [
+ "secur32.lib",
+ "taskschd.lib",
+ "winhttp.lib",
+ ]
deps = [
- ":base",
":constants",
"//base",
"//chrome/installer/util:with_no_strings",
"//chrome/updater:base",
- "//chrome/updater/server/win:updater_idl_idl",
+ "//chrome/updater:version_header",
+ "//chrome/updater/app/server/win:updater_idl_idl",
"//components/update_client",
"//url:url",
]
@@ -165,17 +154,17 @@ source_set("install_app") {
cflags_cc = [ "-Wno-missing-braces" ]
}
-# Tests built into Chrome's unit_tests.exe.
source_set("updater_tests") {
testonly = true
sources = [
+ "group_policy_manager_unittest.cc",
"net/network_unittest.cc",
"util_unittest.cc",
]
deps = [
- ":base",
+ ":constants",
":install_app",
":lib",
"//base/test:test_support",
@@ -200,7 +189,6 @@ test("updater_unittests") {
]
deps = [
- ":base",
":install_app",
":lib",
"//base",
diff --git a/chromium/chrome/updater/win/test/BUILD.gn b/chromium/chrome/updater/win/test/BUILD.gn
index 1340a29072f..1c067608d20 100644
--- a/chromium/chrome/updater/win/test/BUILD.gn
+++ b/chromium/chrome/updater/win/test/BUILD.gn
@@ -26,8 +26,8 @@ source_set("test_common") {
deps = [
"//base",
"//chrome/updater:base",
- "//chrome/updater/win:base",
"//chrome/updater/win:install_app",
+ "//chrome/updater/win:lib",
]
}
diff --git a/chromium/chrome/updater/win/ui/BUILD.gn b/chromium/chrome/updater/win/ui/BUILD.gn
index 3368132e8cc..e2eec0ec86e 100644
--- a/chromium/chrome/updater/win/ui/BUILD.gn
+++ b/chromium/chrome/updater/win/ui/BUILD.gn
@@ -40,8 +40,8 @@ source_set("ui") {
"//base",
"//base:i18n",
"//chrome/updater:base",
- "//chrome/updater/win:base",
"//chrome/updater/win:install_progress_observer",
+ "//chrome/updater/win:lib",
"//third_party/wtl",
]