summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrickyz <rickyz@chromium.org>2015-04-30 14:55:06 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-30 21:56:21 +0000
commitb356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6 (patch)
tree600ee2cda53749188ccd29f80af44abd669f243a
parentf02f0cc4ee8f12e53cd57a97bd2d6ef4c3af87ff (diff)
downloadchromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.zip
chromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.tar.gz
chromium_src-b356c585d9f6841dcc7df05b8e7cfad0a2b4bdf6.tar.bz2
Revert of Add installer_util_unittests to the GN windows build (patchset #5 id:80001 of https://codereview.chromium.org/1062743006/)
Reason for revert: Compilation errors that look related to the installer_util_strings.rc move: http://build.chromium.org/p/chromium/builders/Win/builds/31460 Original issue's description: > Add installer_util_unittests to the GN windows build > > This fixes some C++ Warnings on Windows to avoid having to add suppressions to the GN build. > > Moves the generated strings header to the same place in the gen tree as it is in the source tree. Update includes. > > CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg > > Committed: https://crrev.com/cb55755a09b9e2d8c5b05b7a4ad2ff8631e15b13 > Cr-Commit-Position: refs/heads/master@{#327790} TBR=dpranke@chromium.org,brettw@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1116263002 Cr-Commit-Position: refs/heads/master@{#327799}
-rw-r--r--BUILD.gn7
-rw-r--r--chrome/app_installer/BUILD.gn2
-rw-r--r--chrome/browser/chrome_browser_main_win.cc2
-rw-r--r--chrome/chrome.gyp1
-rw-r--r--chrome/chrome_installer.gypi13
-rw-r--r--chrome/installer/setup/app_launcher_installer.cc3
-rw-r--r--chrome/installer/setup/setup_main.cc3
-rw-r--r--chrome/installer/setup/setup_unittests.rc2
-rw-r--r--chrome/installer/test/BUILD.gn60
-rw-r--r--chrome/installer/test/alternate_version_generator.cc6
-rw-r--r--chrome/installer/test/resource_updater.cc3
-rw-r--r--chrome/installer/upgrade_test.gyp3
-rw-r--r--chrome/installer/util/BUILD.gn88
-rw-r--r--chrome/installer/util/browser_distribution.cc3
-rw-r--r--chrome/installer/util/chrome_frame_distribution.cc3
-rw-r--r--chrome/installer/util/delete_after_reboot_helper_unittest.cc3
-rw-r--r--chrome/installer/util/firewall_manager_win.cc3
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc3
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.cc3
-rw-r--r--chrome/installer/util/installer_state_unittest.cc3
-rw-r--r--chrome/installer/util/installer_util_unittests.rc2
-rw-r--r--chrome/installer/util/language_selector.cc3
-rw-r--r--chrome/installer/util/logging_installer_unittest.cc12
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc12
-rw-r--r--chrome/installer/util/shell_util.cc3
-rw-r--r--chrome/test/BUILD.gn2
26 files changed, 54 insertions, 194 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 157d619..bf50824 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -788,14 +788,13 @@ if (is_linux) {
"//base:base_unittests", # PASSES 4/20/2015
"//cc:cc_unittests", # PASSES 4/17/2015
"//chrome_elf:chrome_elf_unittests", # FAILS 4/20/2015
- "//chrome/app_installer:app_installer_unittests", # PASSES 4/24/2015
- "//chrome/installer/util:installer_util_unittests",
+ "//chrome/app_installer:app_installer_unittests",
"//chrome/test:browser_tests",
"//chrome/test:interactive_ui_tests",
"//chrome/test:sync_integration_tests", # Note: need to turn off incremental linking for debug.
"//chrome/test:unit_tests",
"//chrome/test/chromedriver:chromedriver_unittests", # PASSES 4/20/2015
- "//components:components_browsertests", # PASSES 4/24/2015
+ "//components:components_browsertests",
"//components:components_unittests", # PASSES 4/17/2015
"//courgette:courgette_unittests", # PASSES 4/20/2015
"//content/test:content_browsertests",
@@ -844,6 +843,8 @@ if (is_linux) {
"//ui/wm:wm_unittests", # PASSES 4/21/2015
"//url:url_unittests", # PASSES 4/17/2015
+ # TODO(GYP) installer_util_unittests
+ # TODO(GYP) app_installer_unittests
# TODO(GYP) nacl_integration
# TODO(GYP) telemetry_perf_unittests
# TODO(GYP) telemetry_unittests
diff --git a/chrome/app_installer/BUILD.gn b/chrome/app_installer/BUILD.gn
index fed53cd..f371e40 100644
--- a/chrome/app_installer/BUILD.gn
+++ b/chrome/app_installer/BUILD.gn
@@ -8,7 +8,7 @@ assert(is_win)
executable("app_installer") {
sources = [
- "win/app_installer_main.cc",
+ "/win/app_installer_main.cc"
]
configs -= [ "//build/config/win:console" ]
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 1e791cc..101e5dc 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -50,7 +50,6 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/shell_util.h"
#include "content/public/browser/browser_thread.h"
@@ -59,6 +58,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/dwrite_font_platform_win.h"
#include "content/public/common/main_function_params.h"
+#include "installer_util_strings/installer_util_strings.h"
#include "ui/base/cursor/cursor_loader_win.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index fd701ce..7a6b421 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -402,7 +402,6 @@
],
},
{
- # GN version: //chrome:chrome_version_resources
'target_name': 'chrome_version_resources',
'type': 'none',
'variables': {
diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi
index d3d979a..52411a9 100644
--- a/chrome/chrome_installer.gypi
+++ b/chrome/chrome_installer.gypi
@@ -76,7 +76,6 @@
],
},
{
- # GN version: //chrome/installer/util:installer_util_unittests
'target_name': 'installer_util_unittests',
'type': 'executable',
'dependencies': [
@@ -95,7 +94,6 @@
'..',
],
'sources': [
- # List duplicated in GN build.
'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc',
'installer/setup/compat_checks_unittest.cc',
'installer/setup/setup_constants.cc',
@@ -162,7 +160,6 @@
'variables': {
'create_string_rc_py': 'installer/util/prebuild/create_string_rc.py',
'brand_strings': '<(branding_path_component)_strings',
- 'gen_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util',
},
'inputs': [
@@ -170,20 +167,20 @@
'app/<(brand_strings).grd',
],
'outputs': [
- '<(gen_dir)/installer_util_strings.h',
- '<(gen_dir)/installer_util_strings.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.h',
+ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc',
],
'action': ['python',
'<(create_string_rc_py)',
'-i', 'app/<(brand_strings).grd:resources',
'-n', 'installer_util_strings',
- '-o', '<(gen_dir)',],
+ '-o', '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',],
'message': 'Generating installer_util_strings',
},
],
'direct_dependent_settings': {
'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
+ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings',
],
},
},
@@ -231,7 +228,7 @@
],
},
'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util/installer_util_strings.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc',
'installer/mini_installer/chrome.release',
'installer/setup/app_launcher_installer.cc',
'installer/setup/app_launcher_installer.h',
diff --git a/chrome/installer/setup/app_launcher_installer.cc b/chrome/installer/setup/app_launcher_installer.cc
index 46670fa..3c30aaf 100644
--- a/chrome/installer/setup/app_launcher_installer.cc
+++ b/chrome/installer/setup/app_launcher_installer.cc
@@ -13,13 +13,14 @@
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/installer_state.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/product.h"
#include "chrome/installer/util/updating_app_registration_data.h"
#include "chrome/installer/util/work_item.h"
#include "chrome/installer/util/work_item_list.h"
+#include "installer_util_strings.h" // NOLINT
+
namespace installer {
namespace {
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index d50aa1e..acc35d7 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -56,7 +56,6 @@
#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/installation_validator.h"
#include "chrome/installer/util/installer_state.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/logging_installer.h"
#include "chrome/installer/util/lzma_util.h"
@@ -66,6 +65,8 @@
#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/user_experiment.h"
+#include "installer_util_strings.h" // NOLINT
+
#if defined(GOOGLE_CHROME_BUILD)
#include "chrome/installer/util/updating_app_registration_data.h"
#endif
diff --git a/chrome/installer/setup/setup_unittests.rc b/chrome/installer/setup/setup_unittests.rc
index 4fd7dd5..67c1959 100644
--- a/chrome/installer/setup/setup_unittests.rc
+++ b/chrome/installer/setup/setup_unittests.rc
@@ -55,7 +55,7 @@ END
//
// String Table
//
-#include "chrome/installer/util/installer_util_strings.rc"
+#include "installer_util_strings.rc"
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/installer/test/BUILD.gn b/chrome/installer/test/BUILD.gn
deleted file mode 100644
index ac4ef59..0000000
--- a/chrome/installer/test/BUILD.gn
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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)
-
-executable("alternate_version_generator") {
- testonly = true
- sources = [
- "alternate_version_generator_main.cc",
- ]
-
- deps = [
- ":alternate_version_generator_lib",
- "//base",
- "//base/test:test_support",
- "//chrome/common:constants",
- "//chrome/installer/util",
- "//testing/gtest",
- ]
-}
-
-source_set("alternate_version_generator_lib") {
- testonly = true
- sources = [
- "alternate_version_generator.cc",
- "alternate_version_generator.h",
- "pe_image_resources.cc",
- "pe_image_resources.h",
- "resource_loader.cc",
- "resource_loader.h",
- "resource_updater.cc",
- "resource_updater.h",
- ]
- deps = [
- "//base",
- "//chrome/installer/util",
- "//chrome/common:constants",
- ]
-}
-
-test("upgrade_test") {
- sources = [
- "run_all_tests.cc",
- "upgrade_test.cc",
- ]
- deps = [
- ":alternate_version_generator_lib",
- "//base",
- "//base/test:test_support",
- "//chrome/common:constants",
- "//chrome/installer/util",
- "//testing/gtest",
- ]
- data_deps = [
- # 'mini_installer.gyp:mini_installer', TODO(GYP)
- ]
-}
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index 039c1ef..e50c293 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -226,7 +226,7 @@ bool RunProcessAndWait(const wchar_t* exe_path, const std::wstring& cmdline,
<< cmdline << "\".";
result = false;
} else {
- DCHECK_NE(*exit_code, static_cast<int>(STILL_ACTIVE));
+ DCHECK_NE(*exit_code, STILL_ACTIVE);
}
}
} else {
@@ -547,7 +547,7 @@ bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
base::WriteFile(setup_ex_,
reinterpret_cast<const char*>(resource_data.first),
static_cast<int>(resource_data.second));
- if (written != static_cast<int>(resource_data.second)) {
+ if (written != resource_data.second) {
LOG(DFATAL) << "Failed writing \"" << setup_ex_.value() << "\"";
return false;
}
@@ -559,7 +559,7 @@ bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
base::WriteFile(chrome_packed_7z,
reinterpret_cast<const char*>(resource_data.first),
static_cast<int>(resource_data.second));
- if (written != static_cast<int>(resource_data.second)) {
+ if (written != resource_data.second) {
LOG(DFATAL) << "Failed writing \"" << chrome_packed_7z.value() << "\"";
return false;
}
diff --git a/chrome/installer/test/resource_updater.cc b/chrome/installer/test/resource_updater.cc
index 4c6be27..cf05094 100644
--- a/chrome/installer/test/resource_updater.cc
+++ b/chrome/installer/test/resource_updater.cc
@@ -43,8 +43,7 @@ bool ResourceUpdater::Update(const std::wstring& name,
if (input.Initialize(input_file)) {
if (UpdateResource(handle_, type.c_str(), name.c_str(), language_id,
- const_cast<uint8*>(input.data()),
- static_cast<DWORD>(input.length()))
+ const_cast<uint8*>(input.data()), input.length())
!= FALSE) {
return true;
}
diff --git a/chrome/installer/upgrade_test.gyp b/chrome/installer/upgrade_test.gyp
index 07b283e..bccc94d 100644
--- a/chrome/installer/upgrade_test.gyp
+++ b/chrome/installer/upgrade_test.gyp
@@ -19,7 +19,6 @@
['OS=="win"', {
'targets': [
{
- # GN version: //chrome/installer/test:alternate_version_generator_lib
'target_name': 'alternate_version_generator_lib',
'type': 'static_library',
'dependencies': [
@@ -44,7 +43,6 @@
'msvs_disabled_warnings': [4267, ],
},
{
- # GN version: //chrome/installer/test:upgrade_test
'target_name': 'upgrade_test',
'type': 'executable',
'dependencies': [
@@ -70,7 +68,6 @@
],
},
{
- # GN version: //chrome/installer/test:alternate_version_generator
'target_name': 'alternate_version_generator',
'type': 'executable',
'dependencies': [
diff --git a/chrome/installer/util/BUILD.gn b/chrome/installer/util/BUILD.gn
index 4351912..8dca7ce 100644
--- a/chrome/installer/util/BUILD.gn
+++ b/chrome/installer/util/BUILD.gn
@@ -2,8 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//testing/test.gni")
-
static_library("util") {
deps = [
"//base",
@@ -65,6 +63,7 @@ static_library("util") {
"//third_party/icu",
"//third_party/lzma_sdk",
]
+ include_dirs = [ "$root_gen_dir/installer_util_strings" ]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
@@ -169,8 +168,7 @@ static_library("util") {
}
}
-action("generate_strings") {
- visibility = [ ":strings" ]
+action("strings") {
script = "prebuild/create_string_rc.py"
if (is_chrome_branded) {
@@ -183,9 +181,11 @@ action("generate_strings") {
grdfile,
]
+ # TODO(brettw) move to target_gen_dir
+ outdir = "$root_gen_dir/installer_util_strings"
outputs = [
- "$target_gen_dir/installer_util_strings.h",
- "$target_gen_dir/installer_util_strings.rc",
+ "$outdir/installer_util_strings.h",
+ "$outdir/installer_util_strings.rc",
]
args = [
@@ -194,80 +194,6 @@ action("generate_strings") {
"-n",
"installer_util_strings",
"-o",
- rebase_path(target_gen_dir, root_build_dir),
+ rebase_path(outdir, root_build_dir),
]
}
-
-# Compile the generated .rc file.
-source_set("strings") {
- sources = get_target_outputs(":generate_strings")
- deps = [
- ":generate_strings",
- ]
-}
-
-if (is_win) {
- test("installer_util_unittests") {
- sources = [
- "../setup/compat_checks_unittest.cc",
- "../setup/setup_constants.cc",
- "advanced_firewall_manager_win_unittest.cc",
- "callback_work_item_unittest.cc",
- "channel_info_unittest.cc",
- "copy_tree_work_item_unittest.cc",
- "create_dir_work_item_unittest.cc",
- "create_reg_key_work_item_unittest.cc",
- "delete_after_reboot_helper_unittest.cc",
- "delete_reg_key_work_item_unittest.cc",
- "delete_reg_value_work_item_unittest.cc",
- "delete_tree_work_item_unittest.cc",
- "duplicate_tree_detector_unittest.cc",
- "fake_installation_state.h",
- "fake_product_state.h",
- "google_update_settings_unittest.cc",
- "install_util_unittest.cc",
- "installation_validation_helper.cc",
- "installation_validation_helper.h",
- "installation_validator_unittest.cc",
- "installer_state_unittest.cc",
- "installer_util_test_common.cc",
- "installer_util_test_common.h",
- "installer_util_unittests.rc",
- "installer_util_unittests_resource.h",
- "language_selector_unittest.cc",
- "legacy_firewall_manager_win_unittest.cc",
- "logging_installer_unittest.cc",
- "lzma_util_unittest.cc",
- "master_preferences_unittest.cc",
- "move_tree_work_item_unittest.cc",
- "product_state_unittest.cc",
- "product_unittest.cc",
- "product_unittest.h",
- "registry_key_backup_unittest.cc",
- "registry_test_data.cc",
- "registry_test_data.h",
- "run_all_unittests.cc",
- "self_cleaning_temp_dir_unittest.cc",
- "set_reg_value_work_item_unittest.cc",
- "shell_util_unittest.cc",
- "uninstall_metrics_unittest.cc",
- "wmi_unittest.cc",
- "work_item_list_unittest.cc",
- ]
-
- deps = [
- ":strings",
- ":util",
- "//base",
- "//base:i18n",
- "//base/test:test_support",
- "//chrome:chrome_version_resources",
- "//chrome/installer/test:alternate_version_generator_lib",
- "//content/public/common",
- "//testing/gmock",
- "//testing/gtest",
- ]
-
- # TODO(GYP) manifest: $(ProjectDir)\\installer\\mini_installer\\mini_installer.exe.manifest
- }
-} # is_win
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index 9457890..dd7918d 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -24,11 +24,12 @@
#include "chrome/installer/util/google_chrome_distribution.h"
#include "chrome/installer/util/google_chrome_sxs_distribution.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/non_updating_app_registration_data.h"
+#include "installer_util_strings.h" // NOLINT
+
using installer::MasterPreferences;
namespace {
diff --git a/chrome/installer/util/chrome_frame_distribution.cc b/chrome/installer/util/chrome_frame_distribution.cc
index 11d8507..9f57ae6 100644
--- a/chrome/installer/util/chrome_frame_distribution.cc
+++ b/chrome/installer/util/chrome_frame_distribution.cc
@@ -16,10 +16,11 @@
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/updating_app_registration_data.h"
+#include "installer_util_strings.h" // NOLINT
+
namespace {
const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
}
diff --git a/chrome/installer/util/delete_after_reboot_helper_unittest.cc b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
index 8ee4bdc..f0acaca 100644
--- a/chrome/installer/util/delete_after_reboot_helper_unittest.cc
+++ b/chrome/installer/util/delete_after_reboot_helper_unittest.cc
@@ -53,8 +53,7 @@ class DeleteAfterRebootHelperTest : public testing::Test {
std::vector<char> buffer;
StringArrayToMultiSZBytes(original_pending_moves_, &buffer);
session_manager_key.WriteValue(kPendingFileRenameOps, &buffer[0],
- static_cast<int>(buffer.size()),
- REG_MULTI_SZ);
+ buffer.size(), REG_MULTI_SZ);
}
}
diff --git a/chrome/installer/util/firewall_manager_win.cc b/chrome/installer/util/firewall_manager_win.cc
index df756a5..202d062 100644
--- a/chrome/installer/util/firewall_manager_win.cc
+++ b/chrome/installer/util/firewall_manager_win.cc
@@ -9,10 +9,11 @@
#include "chrome/installer/util/advanced_firewall_manager_win.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/legacy_firewall_manager_win.h"
+#include "installer_util_strings.h" // NOLINT
+
namespace installer {
namespace {
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index ff32f5854..102f163 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -25,7 +25,6 @@
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/uninstall_metrics.h"
#include "chrome/installer/util/updating_app_registration_data.h"
@@ -33,6 +32,8 @@
#include "chrome/installer/util/wmi.h"
#include "content/public/common/result_codes.h"
+#include "installer_util_strings.h" // NOLINT
+
namespace {
const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}";
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc
index a6b23a8..f4a3c3b 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -9,9 +9,10 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "chrome/common/chrome_icon_resources_win.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/updating_app_registration_data.h"
+#include "installer_util_strings.h" // NOLINT
+
namespace {
const wchar_t kChromeSxSGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}";
diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc
index 1d60829..c9b5940 100644
--- a/chrome/installer/util/installer_state_unittest.cc
+++ b/chrome/installer/util/installer_state_unittest.cc
@@ -28,13 +28,14 @@
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/installer_state.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/product_unittest.h"
#include "chrome/installer/util/util_constants.h"
#include "chrome/installer/util/work_item.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "installer_util_strings.h" // NOLINT
+
using base::win::RegKey;
using installer::InstallationState;
using installer::InstallerState;
diff --git a/chrome/installer/util/installer_util_unittests.rc b/chrome/installer/util/installer_util_unittests.rc
index 0c58eb8..4d89af6 100644
--- a/chrome/installer/util/installer_util_unittests.rc
+++ b/chrome/installer/util/installer_util_unittests.rc
@@ -57,7 +57,7 @@ END
//
// String Table
//
-#include "chrome/installer/util/installer_util_strings.rc"
+#include "installer_util_strings.rc"
#ifndef APSTUDIO_INVOKED
diff --git a/chrome/installer/util/language_selector.cc b/chrome/installer/util/language_selector.cc
index 5197d06..c0a31bb 100644
--- a/chrome/installer/util/language_selector.cc
+++ b/chrome/installer/util/language_selector.cc
@@ -15,7 +15,8 @@
#include "base/strings/string_util.h"
#include "base/win/i18n.h"
#include "chrome/installer/util/google_update_settings.h"
-#include "chrome/installer/util/installer_util_strings.h"
+
+#include "installer_util_strings.h"
namespace {
diff --git a/chrome/installer/util/logging_installer_unittest.cc b/chrome/installer/util/logging_installer_unittest.cc
index 06b959a..910f35d 100644
--- a/chrome/installer/util/logging_installer_unittest.cc
+++ b/chrome/installer/util/logging_installer_unittest.cc
@@ -20,8 +20,7 @@ TEST(LoggingInstallerTest, TestTruncate) {
base::FilePath temp_file = temp_dir.path().Append(L"temp");
EXPECT_EQ(test_data.size(),
- base::WriteFile(temp_file, &test_data[0],
- static_cast<int>(test_data.size())));
+ base::WriteFile(temp_file, &test_data[0], test_data.size()));
ASSERT_TRUE(base::PathExists(temp_file));
int64 file_size = 0;
@@ -46,8 +45,7 @@ TEST(LoggingInstallerTest, TestTruncationNotNeeded) {
base::FilePath temp_file = temp_dir.path().Append(L"temp");
EXPECT_EQ(test_data.size(),
- base::WriteFile(temp_file, &test_data[0],
- static_cast<int>(test_data.size())));
+ base::WriteFile(temp_file, &test_data[0], test_data.size()));
ASSERT_TRUE(base::PathExists(temp_file));
int64 file_size = 0;
@@ -69,8 +67,7 @@ TEST(LoggingInstallerTest, TestInUseNeedsTruncation) {
base::FilePath temp_file = temp_dir.path().Append(L"temp");
EXPECT_EQ(test_data.size(),
- base::WriteFile(temp_file, &test_data[0],
- static_cast<int>(test_data.size())));
+ base::WriteFile(temp_file, &test_data[0], test_data.size()));
ASSERT_TRUE(base::PathExists(temp_file));
int64 file_size = 0;
EXPECT_TRUE(base::GetFileSize(temp_file, &file_size));
@@ -98,8 +95,7 @@ TEST(LoggingInstallerTest, TestMoveFailsNeedsTruncation) {
base::FilePath temp_file = temp_dir.path().Append(L"temp");
EXPECT_EQ(test_data.size(),
- base::WriteFile(temp_file, &test_data[0],
- static_cast<int>(test_data.size())));
+ base::WriteFile(temp_file, &test_data[0], test_data.size()));
ASSERT_TRUE(base::PathExists(temp_file));
int64 file_size = 0;
EXPECT_TRUE(base::GetFileSize(temp_file, &file_size));
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 74de3ac..31f839b 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -76,8 +76,7 @@ TEST_F(MasterPreferencesTest, ParseDistroParams) {
" }\n"
"} \n";
- EXPECT_TRUE(base::WriteFile(prefs_file(), text,
- static_cast<int>(strlen(text))));
+ EXPECT_TRUE(base::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
EXPECT_TRUE(prefs.read_from_file());
@@ -136,8 +135,7 @@ TEST_F(MasterPreferencesTest, ParseMissingDistroParams) {
" }\n"
"} \n";
- EXPECT_TRUE(base::WriteFile(prefs_file(), text,
- static_cast<int>(strlen(text))));
+ EXPECT_TRUE(base::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
EXPECT_TRUE(prefs.read_from_file());
@@ -196,8 +194,7 @@ TEST_F(MasterPreferencesTest, FirstRunTabs) {
" ]\n"
"} \n";
- EXPECT_TRUE(base::WriteFile(prefs_file(), text,
- static_cast<int>(strlen(text))));
+ EXPECT_TRUE(base::WriteFile(prefs_file(), text, strlen(text)));
installer::MasterPreferences prefs(prefs_file());
typedef std::vector<std::string> TabsVector;
TabsVector tabs = prefs.GetFirstRunTabs();
@@ -255,8 +252,7 @@ TEST_F(MasterPreferencesTest, GetInstallPreferencesTest) {
" \"verbose_logging\": false\n"
" }\n"
"} \n";
- EXPECT_TRUE(base::WriteFile(prefs_file, text,
- static_cast<int>(strlen(text))));
+ EXPECT_TRUE(base::WriteFile(prefs_file, text, strlen(text)));
// Make sure command line values override the values in master preferences.
std::wstring cmd_str(
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index acff489d..548fbb8 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -44,13 +44,14 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
-#include "chrome/installer/util/installer_util_strings.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
#include "chrome/installer/util/util_constants.h"
#include "chrome/installer/util/work_item.h"
+#include "installer_util_strings.h" // NOLINT
+
using base::win::RegKey;
namespace {
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 7379841..8268f25 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -1603,6 +1603,7 @@ if (!is_android) {
# but that causes errors in other targets when
# resulting .res files get referenced multiple times.
#'<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc', TODO(GYP)
+ #'<(SHARED_INTERMEDIATE_DIR)/installer_util_strings/installer_util_strings.rc', TODO(GYP)
#'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO(GYP)
]
@@ -1611,7 +1612,6 @@ if (!is_android) {
#'browser/safe_browsing/incident_reporting/verifier_test/verifier_unittest.gyp:verifier_test_dll_2', TODO(GYP)
#'chrome_version_resources', TODO(GYP)
"//chrome_elf:blacklist_test_dll_1",
- "//chrome/installer/util:strings",
"//third_party/iaccessible2",
"//third_party/isimpledom",
"//third_party/wtl",