| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 std::string GetOSVersionString() { | 171 std::string GetOSVersionString() { |
| 172 NSString* osVersion = | 172 NSString* osVersion = |
| 173 [NSProcessInfo processInfo].operatingSystemVersionString; | 173 [NSProcessInfo processInfo].operatingSystemVersionString; |
| 174 return StdStringFromNSString(osVersion); | 174 return StdStringFromNSString(osVersion); |
| 175 } | 175 } |
| 176 | 176 |
| 177 int GetProcessorCount() { | 177 int GetProcessorCount() { |
| 178 return [NSProcessInfo processInfo].processorCount; | 178 return [NSProcessInfo processInfo].processorCount; |
| 179 } | 179 } |
| 180 | 180 |
| 181 #if defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 | 181 #if defined(__IPHONE_9_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) \ |
| 182 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 |
| 182 bool GetLowPowerModeEnabled() { | 183 bool GetLowPowerModeEnabled() { |
| 183 if (isOperatingSystemAtLeastVersion(9.0)) { | 184 if (isOperatingSystemAtLeastVersion(9.0)) { |
| 184 // lowPoweredModeEnabled is only available on iOS9+. | 185 // lowPoweredModeEnabled is only available on iOS9+. |
| 185 return [NSProcessInfo processInfo].lowPowerModeEnabled; | 186 return [NSProcessInfo processInfo].lowPowerModeEnabled; |
| 186 } | 187 } |
| 187 LOG(LS_WARNING) << "webrtc::ios::GetLowPowerModeEnabled() is not " | 188 LOG(LS_WARNING) << "webrtc::ios::GetLowPowerModeEnabled() is not " |
| 188 "supported. Requires at least iOS 9.0"; | 189 "supported. Requires at least iOS 9.0"; |
| 189 return false; | 190 return false; |
| 190 } | 191 } |
| 191 #endif | 192 #endif |
| 192 | 193 |
| 193 } // namespace ios | 194 } // namespace ios |
| 194 } // namespace webrtc | 195 } // namespace webrtc |
| 195 | 196 |
| 196 #endif // defined(WEBRTC_IOS) | 197 #endif // defined(WEBRTC_IOS) |
| OLD | NEW |