Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 985573003: Support 32-bit subversion fields in base::Version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a static assert Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/sw_reporter_installer_win.cc
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index c0b877e4380297b8e655eb47de21771e0a08e2af..acb628056af254e01e44427822594b76ed38bc9e 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -121,14 +121,14 @@ void ReportVersionWithUma(const base::Version& version) {
// The major version for X.Y.Z is X*256^3+Y*256+Z. If there are additional
// components, only the first three count, and if there are less than 3, the
// missing values are just replaced by zero. So 1 is equivalent 1.0.0.
- DCHECK_LT(version.components()[0], 0x100);
+ DCHECK_LT(version.components()[0], 0x100U);
uint32_t major_version = 0x1000000 * version.components()[0];
if (version.components().size() >= 2) {
- DCHECK_LT(version.components()[1], 0x10000);
+ DCHECK_LT(version.components()[1], 0x10000U);
major_version += 0x100 * version.components()[1];
}
if (version.components().size() >= 3) {
- DCHECK_LT(version.components()[2], 0x100);
+ DCHECK_LT(version.components()[2], 0x100U);
major_version += version.components()[2];
}
UMA_HISTOGRAM_SPARSE_SLOWLY("SoftwareReporter.MajorVersion", major_version);

Powered by Google App Engine
This is Rietveld 408576698