diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 17:44:43 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 17:44:43 +0000 |
commit | 119a28f0bd4b30742809019a0b1097c58d5c33d0 (patch) | |
tree | 61cfc6171a57a62ab4aa6e8d93f36ece319c63db /chrome/installer/util/google_chrome_distribution.cc | |
parent | db15af3a3c747f3bb8d83e0002703a01dc30d21b (diff) | |
download | chromium_src-119a28f0bd4b30742809019a0b1097c58d5c33d0.zip chromium_src-119a28f0bd4b30742809019a0b1097c58d5c33d0.tar.gz chromium_src-119a28f0bd4b30742809019a0b1097c58d5c33d0.tar.bz2 |
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
Diffstat (limited to 'chrome/installer/util/google_chrome_distribution.cc')
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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 + |