| 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 #import "platform/mac/VersionUtilMac.h" | 5 #import "platform/mac/VersionUtilMac.h" |
| 6 | 6 |
| 7 #include <sys/utsname.h> |
| 7 #include <sstream> | 8 #include <sstream> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <sys/utsname.h> | |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 // Returns the running system's Darwin major version. Don't call this, it's | 13 // Returns the running system's Darwin major version. Don't call this, it's |
| 14 // an implementation detail and its result is meant to be cached by | 14 // an implementation detail and its result is meant to be cached by |
| 15 // MacOSXMinorVersion. | 15 // MacOSXMinorVersion. |
| 16 int DarwinMajorVersionInternal() { | 16 int DarwinMajorVersionInternal() { |
| 17 // The implementation of this method was copied from Chromium, with minor | 17 // The implementation of this method was copied from Chromium, with minor |
| 18 // modifications to avoid the use of methods in base/. For further details, | 18 // modifications to avoid the use of methods in base/. For further details, |
| 19 // see | 19 // see |
| (...skipping 27 matching lines...) Expand all Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 // Returns the running system's Mac OS X minor version. This is the |y| value | 51 // Returns the running system's Mac OS X minor version. This is the |y| value |
| 52 // in 10.y or 10.y.z. | 52 // in 10.y or 10.y.z. |
| 53 int blink::internal::MacOSXMinorVersion() { | 53 int blink::internal::MacOSXMinorVersion() { |
| 54 static int minorVersion = MacOSXMinorVersionInternal(); | 54 static int minorVersion = MacOSXMinorVersionInternal(); |
| 55 return minorVersion; | 55 return minorVersion; |
| 56 } | 56 } |
| OLD | NEW |