summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gn3
-rw-r--r--BUILD.gn5
-rw-r--r--build/toolchain/win/midl.gni3
-rw-r--r--chrome/BUILD.gn2
-rw-r--r--chrome/chrome_installer.gypi5
-rw-r--r--chrome/common/BUILD.gn12
-rw-r--r--chrome/installer/gcapi/BUILD.gn65
-rw-r--r--chrome/installer/gcapi/gcapi.cc3
-rw-r--r--chrome/installer/mini_installer/BUILD.gn1
-rw-r--r--chrome/installer/setup/BUILD.gn2
-rw-r--r--chrome/installer/util/BUILD.gn9
-rw-r--r--google_update/BUILD.gn21
12 files changed, 93 insertions, 38 deletions
diff --git a/.gn b/.gn
index 846d93b..5a7b9ce 100644
--- a/.gn
+++ b/.gn
@@ -24,7 +24,7 @@ check_targets = [
"//cc/*",
#"//chrome/*", # Epic number of errors.
- #"//chrome/installer/*", # A few errors, need to verify the size after fixing.
+ "//chrome/installer/*",
"//chromecast/*",
# TODO(brettw): Fix http://crbug.com/460828 and uncomment the following
@@ -62,6 +62,7 @@ check_targets = [
"//components/webdata_services/*",
#"//content/*", # A whole lot of errors.
+ "//content/public/common:result_codes",
"//courgette/*",
"//crypto/*",
"//data/*",
diff --git a/BUILD.gn b/BUILD.gn
index 71a68a7..b169525 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -220,7 +220,10 @@ group("both_gn_and_gyp") {
}
if (is_win) {
- deps += [ "//chrome/tools/build/win/syzygy:chrome_dll_syzygy" ]
+ deps += [
+ "//chrome/installer/gcapi",
+ "//chrome/tools/build/win/syzygy:chrome_dll_syzygy",
+ ]
}
if (is_android) {
diff --git a/build/toolchain/win/midl.gni b/build/toolchain/win/midl.gni
index 96acd66..ff5899c 100644
--- a/build/toolchain/win/midl.gni
+++ b/build/toolchain/win/midl.gni
@@ -6,7 +6,8 @@ assert(is_win)
import("//build/config/win/visual_studio_version.gni")
-# This template defines a rule to invoke the MS IDL compiler.
+# This template defines a rule to invoke the MS IDL compiler. The generated
+# source code will be compiled and linked into targets that depend on this.
#
# Parameters
#
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 4aaca2b..ae7b4f7 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -868,7 +868,7 @@ if (enable_topchrome_md) {
# GYP version: chrome/chrome_resources.gyp:chrome_strings
group("strings") {
- deps = [
+ public_deps = [
"//chrome/app:chromium_strings",
"//chrome/app:generated_resources",
"//chrome/app:google_chrome_strings",
diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi
index f448ad2..b7b6a3c 100644
--- a/chrome/chrome_installer.gypi
+++ b/chrome/chrome_installer.gypi
@@ -12,6 +12,7 @@
['OS=="win"', {
'targets': [
{
+ # GN version: //chrome/installer/gcapi
'target_name': 'gcapi_dll',
'type': 'loadable_module',
'dependencies': [
@@ -26,6 +27,7 @@
],
},
{
+ # GN version: //chrome/installer/gcapi:lib
'target_name': 'gcapi_lib',
'type': 'static_library',
'dependencies': [
@@ -46,10 +48,9 @@
'installer/gcapi/gcapi_reactivation.cc',
'installer/gcapi/gcapi_reactivation.h',
],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [ 4267, ],
},
{
+ # GN version: //chrome/installer/gcapi:gcapi_test
'target_name': 'gcapi_test',
'type': 'executable',
'dependencies': [
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 1e7cdbe..c3d345d 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -254,14 +254,6 @@ static_library("common") {
}
}
-# This target allows other targets to depend on result_codes.h which is a
-# header-only dependency, without bringing in all of content.
-source_set("result_codes") {
- sources = [
- "chrome_result_codes.h",
- ]
-}
-
process_version("make_chrome_version") {
template_file = "chrome_version.cc.version"
output = "$target_gen_dir/chrome_version.cc"
@@ -281,6 +273,7 @@ static_library("constants") {
"chrome_paths_linux.cc",
"chrome_paths_mac.mm",
"chrome_paths_win.cc",
+ "chrome_result_codes.h",
"chrome_switches.cc",
"chrome_switches.h",
"env_vars.cc",
@@ -293,6 +286,9 @@ static_library("constants") {
"widevine_cdm_constants.h",
]
+ public_deps = [
+ "//content/public/common:result_codes",
+ ]
deps = [
":make_chrome_version",
"//base",
diff --git a/chrome/installer/gcapi/BUILD.gn b/chrome/installer/gcapi/BUILD.gn
new file mode 100644
index 0000000..611ba99
--- /dev/null
+++ b/chrome/installer/gcapi/BUILD.gn
@@ -0,0 +1,65 @@
+# Copyright 2015 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("//testing/test.gni")
+
+assert(is_win)
+
+shared_library("gcapi") {
+ output_name = "gcapi_dll"
+
+ sources = [
+ "gcapi.def",
+ "gcapi_dll.cc",
+ ]
+
+ deps = [
+ ":lib",
+ "//base",
+ ]
+}
+
+source_set("lib") {
+ sources = [
+ "gcapi.cc",
+ "gcapi.h",
+ "gcapi_omaha_experiment.cc",
+ "gcapi_omaha_experiment.h",
+ "gcapi_reactivation.cc",
+ "gcapi_reactivation.h",
+ ]
+
+ deps = [
+ "//base",
+ "//chrome/installer/util",
+ "//chrome/installer/launcher_support",
+ "//components/variations",
+ "//google_update",
+ ]
+}
+
+test("gcapi_test") {
+ sources = [
+ "gcapi_last_run_test.cc",
+ "gcapi_omaha_experiment_test.cc",
+ "gcapi_reactivation_test.cc",
+ "gcapi_test.cc",
+ "gcapi_test.rc",
+ "gcapi_test_registry_overrider.cc",
+ "gcapi_test_registry_overrider.h",
+ "resource.h",
+ ]
+
+ deps = [
+ ":lib",
+ "//base/test:test_support",
+ "//chrome/installer/util",
+ "//components/variations",
+ "//testing/gtest",
+ ]
+
+ data_deps = [
+ ":gcapi", # Runtime dependency on this DLL.
+ ]
+}
diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc
index ae22fa8..8a88a47 100644
--- a/chrome/installer/gcapi/gcapi.cc
+++ b/chrome/installer/gcapi/gcapi.cc
@@ -316,7 +316,8 @@ bool IsRunningElevated() {
}
bool GetUserIdForProcess(size_t pid, wchar_t** user_sid) {
- HANDLE process_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, pid);
+ HANDLE process_handle =
+ ::OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, static_cast<DWORD>(pid));
if (process_handle == NULL)
return false;
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index 9bba523..100f25f 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -68,6 +68,7 @@ source_set("unit_tests") {
":lib",
]
deps = [
+ "//base",
"//testing/gtest",
]
}
diff --git a/chrome/installer/setup/BUILD.gn b/chrome/installer/setup/BUILD.gn
index 73c7519..c09138e 100644
--- a/chrome/installer/setup/BUILD.gn
+++ b/chrome/installer/setup/BUILD.gn
@@ -51,7 +51,9 @@ if (is_win) {
"//chrome/common:constants",
"//chrome/installer/util",
"//chrome_elf:constants",
+ "//courgette:courgette_lib",
"//rlz:rlz_lib",
+ "//third_party/bspatch",
"//third_party/zlib",
]
}
diff --git a/chrome/installer/util/BUILD.gn b/chrome/installer/util/BUILD.gn
index 7b20c75..f64186c 100644
--- a/chrome/installer/util/BUILD.gn
+++ b/chrome/installer/util/BUILD.gn
@@ -10,7 +10,6 @@ static_library("util") {
"//base",
"//chrome:strings",
"//chrome/common:constants",
- "//chrome/common:result_codes",
"//components/variations",
"//content/public/common:result_codes",
]
@@ -58,8 +57,11 @@ static_library("util") {
"user_experiment.cc",
"user_experiment.h",
]
- deps += [
+
+ public_deps = [
":strings",
+ ]
+ deps += [
"//base/third_party/dynamic_annotations",
"//components/metrics",
"//courgette:courgette_lib",
@@ -206,7 +208,7 @@ action("generate_strings") {
# Compile the generated .rc file.
source_set("strings") {
sources = get_target_outputs(":generate_strings")
- deps = [
+ public_deps = [
":generate_strings",
]
}
@@ -268,6 +270,7 @@ if (is_win) {
"//base/test:test_support",
"//chrome:other_version",
"//chrome/common",
+ "//chrome/installer/setup:lib",
"//chrome/installer/test:alternate_version_generator_lib",
"//components/variations",
"//content/public/common",
diff --git a/google_update/BUILD.gn b/google_update/BUILD.gn
index 5d57f60..6c8539a 100644
--- a/google_update/BUILD.gn
+++ b/google_update/BUILD.gn
@@ -4,27 +4,8 @@
import("//build/toolchain/win/midl.gni")
-config("google_update_config") {
- # Chromium uses include paths like "google_update/google_update_idl.h",
- # so add root_gen_dir, rather then target_gen_dir to include dirs.
- include_dirs = [ "$root_gen_dir" ]
-}
-
-midl("google_update_idl") {
+midl("google_update") {
sources = [
"google_update_idl.idl",
]
}
-
-static_library("google_update") {
- sources = [
- "$target_gen_dir/google_update_idl.h",
- "$target_gen_dir/google_update_idl_i.c",
- ]
-
- public_configs = [ ":google_update_config" ]
-
- deps = [
- ":google_update_idl",
- ]
-}