From 119a28f0bd4b30742809019a0b1097c58d5c33d0 Mon Sep 17 00:00:00 2001 From: "grt@chromium.org" Date: Fri, 29 Apr 2011 17:44:43 +0000 Subject: Fix a DCHECK that fires in system-level builds while validating UserExperimentDetails. The lesson learned is that braces must be present for the following pattern: if (cond) { DCHECK_*(...); } else ... Since the DCHECK_op macros expand to if (blahdebla). BUG=none TEST=none R=finnur@chromium.org Review URL: http://codereview.chromium.org/6883264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83539 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/util/google_chrome_distribution.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/installer/util/google_chrome_distribution.cc') diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index dc499aa..89606d1 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -576,10 +576,11 @@ bool GoogleChromeDistribution::GetExperimentDetails( DCHECK_GT(kExperimentFlavors[i].flavors, 0); // Make sure each experiment has valid headings. for (int f = 0; f < kMax; ++f) { - if (f < kExperimentFlavors[i].flavors) + if (f < kExperimentFlavors[i].flavors) { DCHECK_GT(kExperimentFlavors[i].headings[f], 0); - else + } else { DCHECK_EQ(kExperimentFlavors[i].headings[f], 0); + } } // Make sure we don't overflow on the second letter of the experiment code. DCHECK(kExperimentFlavors[i].prefix2 + -- cgit v1.1