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

Side by Side Diff: third_party/crashpad/crashpad/snapshot/system_snapshot.h

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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
OLDNEW
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 18 matching lines...) Expand all
29 //! other characteristics. 29 //! other characteristics.
30 class SystemSnapshot { 30 class SystemSnapshot {
31 public: 31 public:
32 virtual ~SystemSnapshot() {} 32 virtual ~SystemSnapshot() {}
33 33
34 //! \brief A system’s operating system family. 34 //! \brief A system’s operating system family.
35 enum OperatingSystem { 35 enum OperatingSystem {
36 //! \brief The snapshot system’s operating system is unknown. 36 //! \brief The snapshot system’s operating system is unknown.
37 kOperatingSystemUnknown = 0, 37 kOperatingSystemUnknown = 0,
38 38
39 //! \brief Mac OS X. 39 //! \brief macOS.
40 kOperatingSystemMacOSX, 40 kOperatingSystemMacOSX,
41 41
42 //! \brief Windows. 42 //! \brief Windows.
43 kOperatingSystemWindows, 43 kOperatingSystemWindows,
44 }; 44 };
45 45
46 //! \brief A system’s daylight saving time status. 46 //! \brief A system’s daylight saving time status.
47 //! 47 //!
48 //! The daylight saving time status is taken partially from the system’s 48 //! The daylight saving time status is taken partially from the system’s
49 //! locale configuration. This determines whether daylight saving time is 49 //! locale configuration. This determines whether daylight saving time is
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 //! \brief Returns the vendor of the snapshot system’s CPUs. 97 //! \brief Returns the vendor of the snapshot system’s CPUs.
98 //! 98 //!
99 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU 99 //! For x86-family CPUs (including x86_64 and 32-bit x86), this is the CPU
100 //! vendor identification string as encoded in `cpuid 0` `ebx`, `edx`, and 100 //! vendor identification string as encoded in `cpuid 0` `ebx`, `edx`, and
101 //! `ecx`. 101 //! `ecx`.
102 //! 102 //!
103 //! \return A string identifying the vendor of the snapshot system’s CPUs. 103 //! \return A string identifying the vendor of the snapshot system’s CPUs.
104 virtual std::string CPUVendor() const = 0; 104 virtual std::string CPUVendor() const = 0;
105 105
106 //! \brief Returns frequency information about the snapshot system’s CPUs in 106 //! \brief Returns frequency information about the snapshot system’s CPUs in
107 //! \current_hz and \a max_hz. 107 //! \a current_hz and \a max_hz.
108 //! 108 //!
109 //! \param[out] current_hz The snapshot system’s CPU clock frequency in Hz at 109 //! \param[out] current_hz The snapshot system’s CPU clock frequency in Hz at
110 //! the time of the snapshot. 110 //! the time of the snapshot.
111 //! \param[out] max_hz The snapshot system’s maximum possible CPU clock 111 //! \param[out] max_hz The snapshot system’s maximum possible CPU clock
112 //! frequency. 112 //! frequency.
113 virtual void CPUFrequency(uint64_t* current_hz, uint64_t* max_hz) const = 0; 113 virtual void CPUFrequency(uint64_t* current_hz, uint64_t* max_hz) const = 0;
114 114
115 //! \brief Returns an x86-family snapshot system’s CPU signature. 115 //! \brief Returns an x86-family snapshot system’s CPU signature.
116 //! 116 //!
117 //! This is the family, model, and stepping ID values as encoded in `cpuid 1` 117 //! This is the family, model, and stepping ID values as encoded in `cpuid 1`
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 virtual OperatingSystem GetOperatingSystem() const = 0; 191 virtual OperatingSystem GetOperatingSystem() const = 0;
192 192
193 //! \brief Returns whether the snapshot system runs a server variant of its 193 //! \brief Returns whether the snapshot system runs a server variant of its
194 //! operating system. 194 //! operating system.
195 virtual bool OSServer() const = 0; 195 virtual bool OSServer() const = 0;
196 196
197 //! \brief Returns the snapshot system’s operating system version information 197 //! \brief Returns the snapshot system’s operating system version information
198 //! in \a major, \a minor, \a bugfix, and \a build. 198 //! in \a major, \a minor, \a bugfix, and \a build.
199 //! 199 //!
200 //! \param[out] major The snapshot system’s operating system’s first (major) 200 //! \param[out] major The snapshot system’s operating system’s first (major)
201 //! version number component. This would be `10` for Mac OS X 10.9.5, and 201 //! version number component. This would be `10` for macOS 10.12.1, and
202 //! `6` for Windows 7 (NT 6.1) SP1 version 6.1.7601. 202 //! `6` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
203 //! \param[out] minor The snapshot system’s operating system’s second (minor) 203 //! \param[out] minor The snapshot system’s operating system’s second (minor)
204 //! version number component. This would be `9` for Mac OS X 10.9.5, and 204 //! version number component. This would be `12` for macOS 10.12.1, and
205 //! `1` for Windows 7 (NT 6.1) SP1 version 6.1.7601. 205 //! `1` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
206 //! \param[out] bugfix The snapshot system’s operating system’s third (bugfix) 206 //! \param[out] bugfix The snapshot system’s operating system’s third (bugfix)
207 //! version number component. This would be `5` for Mac OS X 10.9.5, and 207 //! version number component. This would be `1` for macOS 10.12.1, and
208 //! `7601` for Windows 7 (NT 6.1) SP1 version 6.1.7601. 208 //! `7601` for Windows 7 (NT 6.1) SP1 version 6.1.7601.
209 //! \param[out] build A string further identifying an operating system 209 //! \param[out] build A string further identifying an operating system
210 //! version. For Mac OS X 10.9.5, this would be `"13F34"`. For Windows, 210 //! version. For macOS 10.12.1, this would be `"16B2657"`. For Windows,
211 //! this would be `"Service Pack 1"` if that service pack was installed. 211 //! this would be `"Service Pack 1"` if that service pack was installed.
212 //! For Linux and other Unix-like systems, this would be the kernel 212 //! On Android, the `ro.build.fingerprint` system property would be
213 //! version from `uname -srvm`, possibly with additional information 213 //! appended. For Linux and other Unix-like systems, this would be the
214 //! appended. On Android, the `ro.build.fingerprint` system property would 214 //! kernel version from `uname -srvm`, possibly with additional
215 //! be appended. 215 //! information appended.
216 virtual void OSVersion(int* major, 216 virtual void OSVersion(int* major,
217 int* minor, 217 int* minor,
218 int* bugfix, 218 int* bugfix,
219 std::string* build) const = 0; 219 std::string* build) const = 0;
220 220
221 //! \brief Returns the snapshot system’s full operating system version 221 //! \brief Returns the snapshot system’s full operating system version
222 //! information in string format. 222 //! information in string format.
223 //! 223 //!
224 //! For Mac OS X, the string contains values from the operating system and 224 //! For macOS, the string contains values from the operating system and
225 //! kernel. A Mac OS X 10.9.5 snapshot system would be identified as `"Mac OS 225 //! kernel. A macOS 10.12.1 system snapshot would be identified as `"Mac OS
226 //! X 10.9.5 (13F34); Darwin 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 226 //! X 10.12.1 (16B2657); Darwin 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct
227 //! 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64"`. 227 //! 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64"`.
228 virtual std::string OSVersionFull() const = 0; 228 virtual std::string OSVersionFull() const = 0;
229 229
230 //! \brief Returns a description of the snapshot system’s hardware in string 230 //! \brief Returns a description of the snapshot system’s hardware in string
231 //! format. 231 //! format.
232 //! 232 //!
233 //! For Mac OS X, the string contains the Mac model and board ID. A mid-2014 233 //! For macOS, the string contains the Mac model and board ID. A mid-2014 15"
234 //! 15" MacBook Pro would be identified as `"MacBookPro11,3 234 //! MacBook Pro would be identified as `"MacBookPro11,3
235 //! (Mac-2BD1B31983FE1663)"`. 235 //! (Mac-2BD1B31983FE1663)"`.
236 virtual std::string MachineDescription() const = 0; 236 virtual std::string MachineDescription() const = 0;
237 237
238 //! \brief Returns the status of the NX (no-execute, or XD, execute-disable) 238 //! \brief Returns the status of the NX (no-execute, or XD, execute-disable)
239 //! feature on the snapshot system. 239 //! feature on the snapshot system.
240 //! 240 //!
241 //! This refers to a feature that allows mapped readable pages to be marked 241 //! This refers to a feature that allows mapped readable pages to be marked
242 //! as non-executable. 242 //! as non-executable.
243 //! 243 //!
244 //! \return `true` if the snapshot system supports NX and it is enabled. 244 //! \return `true` if the snapshot system supports NX and it is enabled.
245 virtual bool NXEnabled() const = 0; 245 virtual bool NXEnabled() const = 0;
246 246
247 //! \brief Returns time zone information from the snapshot system, based on 247 //! \brief Returns time zone information from the snapshot system, based on
248 //! its locale configuration and real-time clock. 248 //! its locale configuration and real-time clock.
249 //! 249 //!
250 //! \param[out] dst_status Whether the location observes daylight saving time, 250 //! \param[out] dst_status Whether the location observes daylight saving time,
251 //! and if so, whether it or standard time is currently being observed. 251 //! and if so, whether it or standard time is currently being observed.
252 //! \param[out] standard_offset_seconds The number of seconds that the 252 //! \param[out] standard_offset_seconds The number of seconds that the
253 //! location’s time zone is east (ahead) of UTC during standard time. 253 //! location’s time zone is east (ahead) of UTC during standard time.
254 //! \param[out] daylight_offset_seconds The number of seconds that the 254 //! \param[out] daylight_offset_seconds The number of seconds that the
255 //! location’s time zone is east (ahead) of UTC during daylight saving. 255 //! location’s time zone is east (ahead) of UTC during daylight saving.
256 //! time. 256 //! time.
257 //! \param[out] standard_name The name of the time zone while standard time is 257 //! \param[out] standard_name The name of the time zone while standard time is
258 //! being observed. 258 //! being observed.
259 //! \param[out] daylight_name The name of the time zone while daylight saving 259 //! \param[out] daylight_name The name of the time zone while daylight saving
260 //! time is being observed. 260 //! time is being observed.
261 virtual void TimeZone(DaylightSavingTimeStatus* observes_daylight, 261 virtual void TimeZone(DaylightSavingTimeStatus* dst_status,
262 int* standard_offset_seconds, 262 int* standard_offset_seconds,
263 int* daylight_offset_seconds, 263 int* daylight_offset_seconds,
264 std::string* standard_name, 264 std::string* standard_name,
265 std::string* daylight_name) const = 0; 265 std::string* daylight_name) const = 0;
266 }; 266 };
267 267
268 } // namespace crashpad 268 } // namespace crashpad
269 269
270 #endif // CRASHPAD_SNAPSHOT_SYSTEM_SNAPSHOT_H_ 270 #endif // CRASHPAD_SNAPSHOT_SYSTEM_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698