Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: webrtc/base/macutils.cc

Issue 2117823002: mac: Make GetOSVersion() private to a cc file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/macutils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/base/macutils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698