OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/sys_info.h" | 5 #include "base/sys_info.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/string_tokenizer.h" | 10 #include "base/string_tokenizer.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 | 14 |
15 #if defined(OFFICIAL_BUILD) | 15 #if defined(GOOGLE_CHROME_BUILD) |
16 static const char kLinuxStandardBaseVersionKey[] = "GOOGLE_RELEASE"; | 16 static const char kLinuxStandardBaseVersionKey[] = "GOOGLE_RELEASE"; |
17 #else | 17 #else |
18 static const char kLinuxStandardBaseVersionKey[] = "DISTRIB_RELEASE"; | 18 static const char kLinuxStandardBaseVersionKey[] = "DISTRIB_RELEASE"; |
19 #endif | 19 #endif |
20 | 20 |
21 const char kLinuxStandardBaseReleaseFile[] = "/etc/lsb-release"; | 21 const char kLinuxStandardBaseReleaseFile[] = "/etc/lsb-release"; |
22 | 22 |
23 // static | 23 // static |
24 void SysInfo::OperatingSystemVersionNumbers(int32 *major_version, | 24 void SysInfo::OperatingSystemVersionNumbers(int32 *major_version, |
25 int32 *minor_version, | 25 int32 *minor_version, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 *minor_version = *bugfix_version = 0; | 60 *minor_version = *bugfix_version = 0; |
61 } else if (1 == i) { | 61 } else if (1 == i) { |
62 *minor_version = StringToInt(tokenizer.token()); | 62 *minor_version = StringToInt(tokenizer.token()); |
63 } else { // 2 == i | 63 } else { // 2 == i |
64 *bugfix_version = StringToInt(tokenizer.token()); | 64 *bugfix_version = StringToInt(tokenizer.token()); |
65 } | 65 } |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 } // namespace base | 69 } // namespace base |
OLD | NEW |