summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-12-11 20:31:25 -0500
committerNico Weber <thakis@chromium.org>2015-12-12 01:33:17 +0000
commitb2a037fd3b5cf847bd3667034763fc64da8660c5 (patch)
tree35cdf7eabeb4b261341238210166f0f5377254f3
parentee3eae72ebd80defe53a45367790becde5504ada (diff)
downloadchromium_src-b2a037fd3b5cf847bd3667034763fc64da8660c5.zip
chromium_src-b2a037fd3b5cf847bd3667034763fc64da8660c5.tar.gz
chromium_src-b2a037fd3b5cf847bd3667034763fc64da8660c5.tar.bz2
Fix a -Wextra warning in branded builds.
BUG=567877 TBR=gab@chromium.org Review URL: https://codereview.chromium.org/1521183002 . Cr-Commit-Position: refs/heads/master@{#364861}
-rw-r--r--chrome/installer/setup/install_worker_unittest.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/installer/setup/install_worker_unittest.cc b/chrome/installer/setup/install_worker_unittest.cc
index 8ff63c3..f0334f1 100644
--- a/chrome/installer/setup/install_worker_unittest.cc
+++ b/chrome/installer/setup/install_worker_unittest.cc
@@ -785,30 +785,31 @@ TEST_F(InstallWorkerTest, WillProductBePresentAfterSetup) {
}
// Loop over operations: {uninstall, install/update}.
- for (int i_op = 0; i_op < arraysize(op_list); ++i_op) {
+ for (InstallerState::Operation op : op_list) {
// Loop over product types to operate on: {TYPE_BROWSER, TYPE_CF}.
for (int i_type_op = 0; i_type_op < NUM_TYPE; ++i_type_op) {
scoped_ptr<InstallerState> installer_state;
if (i_type_op == TYPE_BROWSER) {
installer_state.reset(BuildChromeInstallerState(
- system_level, multi_install, *machine_state, op_list[i_op]));
+ system_level, multi_install, *machine_state, op));
} else if (i_type_op == TYPE_CF) {
// Skip the CF uninstall case due to limitations in
// BuildChromeFrameInstallerState().
- if (op_list[i_op] == InstallerState::UNINSTALL)
+ if (op == InstallerState::UNINSTALL)
continue;
installer_state.reset(BuildChromeFrameInstallerState(
- system_level, multi_install, *machine_state, op_list[i_op]));
+ system_level, multi_install, *machine_state, op));
} else {
NOTREACHED();
}
// Calculate the machine state after operation, as bit mask.
// If uninstall, remove product with bitwise AND; else add with OR.
- int mach_after = (op_list[i_op] == InstallerState::UNINSTALL) ?
- i_mach & ~(1 << i_type_op) : i_mach | (1 << i_type_op);
+ int mach_after = (op == InstallerState::UNINSTALL)
+ ? i_mach & ~(1 << i_type_op)
+ : i_mach | (1 << i_type_op);
// Verify predicted presence of Chrome Binaries.
bool bin_res = installer::WillProductBePresentAfterSetup(