| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/obsolete_system/obsolete_system.h" | 5 #include "chrome/browser/obsolete_system/obsolete_system.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 bool ObsoleteSystem::IsObsoleteNowOrSoon() { | 24 bool ObsoleteSystem::IsObsoleteNowOrSoon() { |
| 25 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 25 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
| 26 #if defined(ARCH_CPU_32_BITS) | 26 #if defined(ARCH_CPU_32_BITS) |
| 27 return true; | 27 return true; |
| 28 #else | 28 #else |
| 29 // Ubuntu 14.04 will be used as the next build platform, and it ships with | 29 // Ubuntu 14.04 will be used as the next build platform, and it ships with |
| 30 // glibc 2.19. However, as of this writing, the binary produced on Ubuntu | 30 // glibc 2.19. However, as of this writing, the binary produced on Ubuntu |
| 31 // 14.04 does not actually require glibc 2.19. Thus this function checks for | 31 // 14.04 does not actually require glibc 2.19. Thus this function checks for |
| 32 // glibc 2.17 as the minimum requirement, so Ubuntu 12.04 (glibc 2.15) will | 32 // glibc 2.17 as the minimum requirement, so Ubuntu 12.04 (glibc 2.15) will |
| 33 // be considered obsolete, but RHEL 7 (glibc 2.17) will not. | 33 // be considered obsolete, but RHEL 7 (glibc 2.17) will not. |
| 34 base::Version version(gnu_get_libc_version()); | 34 Version version(gnu_get_libc_version()); |
| 35 if (!version.IsValid() || version.components().size() != 2) | 35 if (!version.IsValid() || version.components().size() != 2) |
| 36 return false; | 36 return false; |
| 37 | 37 |
| 38 uint32_t glibc_major_version = version.components()[0]; | 38 uint32_t glibc_major_version = version.components()[0]; |
| 39 uint32_t glibc_minor_version = version.components()[1]; | 39 uint32_t glibc_minor_version = version.components()[1]; |
| 40 if (glibc_major_version < 2) | 40 if (glibc_major_version < 2) |
| 41 return true; | 41 return true; |
| 42 | 42 |
| 43 return glibc_major_version == 2 && glibc_minor_version < 17; | 43 return glibc_major_version == 2 && glibc_minor_version < 17; |
| 44 #endif // defined(ARCH_CPU_32_BITS) | 44 #endif // defined(ARCH_CPU_32_BITS) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 // static | 80 // static |
| 81 const char* ObsoleteSystem::GetLinkURL() { | 81 const char* ObsoleteSystem::GetLinkURL() { |
| 82 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 82 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
| 83 return chrome::kLinuxWheezyPreciseDeprecationURL; | 83 return chrome::kLinuxWheezyPreciseDeprecationURL; |
| 84 #else | 84 #else |
| 85 return ""; | 85 return ""; |
| 86 #endif | 86 #endif |
| 87 } | 87 } |
| OLD | NEW |