OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 return std::string(); | 176 return std::string(); |
177 } | 177 } |
178 | 178 |
179 } // namespace | 179 } // namespace |
180 | 180 |
181 namespace crashpad { | 181 namespace crashpad { |
182 | 182 |
183 int MacOSXMinorVersion() { | 183 int MacOSXMinorVersion() { |
184 // The Darwin major version is always 4 greater than the Mac OS X minor | 184 // The Darwin major version is always 4 greater than the macOS minor version |
185 // version for Darwin versions beginning with 6, corresponding to Mac OS X | 185 // for Darwin versions beginning with 6, corresponding to Mac OS X 10.2. |
186 // 10.2. | |
187 static int mac_os_x_minor_version = DarwinMajorVersion() - 4; | 186 static int mac_os_x_minor_version = DarwinMajorVersion() - 4; |
188 DCHECK(mac_os_x_minor_version >= 2); | 187 DCHECK(mac_os_x_minor_version >= 2); |
189 return mac_os_x_minor_version; | 188 return mac_os_x_minor_version; |
190 } | 189 } |
191 | 190 |
192 bool MacOSXVersion(int* major, | 191 bool MacOSXVersion(int* major, |
193 int* minor, | 192 int* minor, |
194 int* bugfix, | 193 int* bugfix, |
195 std::string* build, | 194 std::string* build, |
196 bool* server, | 195 bool* server, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 IORegistryEntryDataPropertyAsString(platform_expert, CFSTR("model"))); | 272 IORegistryEntryDataPropertyAsString(platform_expert, CFSTR("model"))); |
274 board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert, | 273 board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert, |
275 CFSTR("board-id"))); | 274 CFSTR("board-id"))); |
276 } else { | 275 } else { |
277 model->clear(); | 276 model->clear(); |
278 board_id->clear(); | 277 board_id->clear(); |
279 } | 278 } |
280 } | 279 } |
281 | 280 |
282 } // namespace crashpad | 281 } // namespace crashpad |
OLD | NEW |