summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 06:22:12 +0000
committerrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 06:22:12 +0000
commit46c373a985279036959156ba08f048d49c8cd90e (patch)
tree379f3975b0c5b1b1268b0e325a40acfb1d8df0ed /base
parent7b96328ff9e87f31aaf6413088f0290cb5a57ead (diff)
downloadchromium_src-46c373a985279036959156ba08f048d49c8cd90e.zip
chromium_src-46c373a985279036959156ba08f048d49c8cd90e.tar.gz
chromium_src-46c373a985279036959156ba08f048d49c8cd90e.tar.bz2
Remove version hacks for platform version.
ChromeOS is now using platform numbers as intended, hence the hacks put in place to extract the platform numbers from the old ChromeOS version numbers are no longer needed. Removed them. R=davemoore@chromium.org,evan@chromium.org,zelidrag@chromium.org BUG=chromium-os:20934 TEST=Checked all places where the version shows up. On the latest build it was breaking, it shows correctly again after this fix. Review URL: http://codereview.chromium.org/8068028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/sys_info_chromeos.cc11
-rw-r--r--base/sys_info_unittest.cc12
2 files changed, 10 insertions, 13 deletions
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index f724f99..1ada002 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -94,20 +94,17 @@ void SysInfo::ParseLsbRelease(const std::string& lsb_release,
size_t length = lsb_release.find_first_of('\n', start_index) - start_index;
std::string version = lsb_release.substr(start_index, length);
StringTokenizer tokenizer(version, ".");
- // TODO(rkc): Ignore the 0. here; fix this once we move Chrome OS version
- // numbers from the 0.xx.yyy.zz format to the xx.yyy.zz format.
- // Refer to http://code.google.com/p/chromium-os/issues/detail?id=15789
- for (int i = 0; i < 4 && tokenizer.GetNext(); i++) {
- if (1 == i) {
+ for (int i = 0; i < 3 && tokenizer.GetNext(); ++i) {
+ if (0 == i) {
StringToInt(tokenizer.token_begin(),
tokenizer.token_end(),
major_version);
*minor_version = *bugfix_version = 0;
- } else if (2 == i) {
+ } else if (1 == i) {
StringToInt(tokenizer.token_begin(),
tokenizer.token_end(),
minor_version);
- } else { // 3 == i
+ } else { // 2 == i
StringToInt(tokenizer.token_begin(),
tokenizer.token_end(),
bugfix_version);
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index 57eb905..edabdb5 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -54,9 +54,9 @@ TEST_F(SysInfoTest, GoogleChromeOSVersionNumbers) {
&os_major_version,
&os_minor_version,
&os_bugfix_version);
- EXPECT_EQ(2, os_major_version);
- EXPECT_EQ(3, os_minor_version);
- EXPECT_EQ(4, os_bugfix_version);
+ EXPECT_EQ(1, os_major_version);
+ EXPECT_EQ(2, os_minor_version);
+ EXPECT_EQ(3, os_bugfix_version);
}
TEST_F(SysInfoTest, GoogleChromeOSVersionNumbersFirst) {
@@ -70,9 +70,9 @@ TEST_F(SysInfoTest, GoogleChromeOSVersionNumbersFirst) {
&os_major_version,
&os_minor_version,
&os_bugfix_version);
- EXPECT_EQ(2, os_major_version);
- EXPECT_EQ(3, os_minor_version);
- EXPECT_EQ(4, os_bugfix_version);
+ EXPECT_EQ(1, os_major_version);
+ EXPECT_EQ(2, os_minor_version);
+ EXPECT_EQ(3, os_bugfix_version);
}
TEST_F(SysInfoTest, GoogleChromeOSNoVersionNumbers) {