OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (noErr == result) { | 76 if (noErr == result) { |
77 *value = native_value; | 77 *value = native_value; |
78 return true; | 78 return true; |
79 } | 79 } |
80 std::string str; | 80 std::string str; |
81 DecodeFourChar(ostype, &str); | 81 DecodeFourChar(ostype, &str); |
82 LOG_E(LS_ERROR, OS, result) << "Gestalt(" << str << ")"; | 82 LOG_E(LS_ERROR, OS, result) << "Gestalt(" << str << ")"; |
83 return false; | 83 return false; |
84 } | 84 } |
85 | 85 |
86 bool GetOSVersion(int* major, int* minor, int* bugfix) { | 86 static bool GetOSVersion(int* major, int* minor, int* bugfix) { |
87 ASSERT(major && minor && bugfix); | 87 ASSERT(major && minor && bugfix); |
88 if (!GetGestalt(gestaltSystemVersion, major)) { | 88 if (!GetGestalt(gestaltSystemVersion, major)) { |
89 return false; | 89 return false; |
90 } | 90 } |
91 if (*major < 0x1040) { | 91 if (*major < 0x1040) { |
92 *bugfix = *major & 0xF; | 92 *bugfix = *major & 0xF; |
93 *minor = (*major >> 4) & 0xF; | 93 *minor = (*major >> 4) & 0xF; |
94 *major = (*major >> 8); | 94 *major = (*major >> 8); |
95 return true; | 95 return true; |
96 } | 96 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 #else | 212 #else |
213 // TODO(thaloun): Support applescripts with the NSAppleScript API. | 213 // TODO(thaloun): Support applescripts with the NSAppleScript API. |
214 return false; | 214 return false; |
215 #endif // CARBON_DEPRECATED | 215 #endif // CARBON_DEPRECATED |
216 } | 216 } |
217 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) | 217 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) |
218 | 218 |
219 /////////////////////////////////////////////////////////////////////////////// | 219 /////////////////////////////////////////////////////////////////////////////// |
220 | 220 |
221 } // namespace rtc | 221 } // namespace rtc |
OLD | NEW |