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

Unified Diff: third_party/crashpad/crashpad/util/posix/process_info.h

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/posix/process_info.h
diff --git a/third_party/crashpad/crashpad/util/posix/process_info.h b/third_party/crashpad/crashpad/util/posix/process_info.h
index 1aa23d8c3d751e748981ada1a4c5cce579fea5ab..5e1a61085628e9f97abd54901c8a68eda2a8e478 100644
--- a/third_party/crashpad/crashpad/util/posix/process_info.h
+++ b/third_party/crashpad/crashpad/util/posix/process_info.h
@@ -25,6 +25,7 @@
#include "base/macros.h"
#include "build/build_config.h"
+#include "util/misc/initialization_state.h"
#include "util/misc/initialization_state_dcheck.h"
#if defined(OS_MACOSX)
@@ -113,13 +114,21 @@ class ProcessInfo {
//! `execve()` as a result of executing a setuid or setgid executable.
bool DidChangePrivileges() const;
- //! \return `true` if the target task is a 64-bit process.
- bool Is64Bit() const;
+ //! \brief Determines the target process’ bitness.
+ //!
+ //! \param[out] is_64_bit `true` if the target task is a 64-bit process.
+ //!
+ //! \return `true` on success, with \a is_64_bit set. Otherwise, `false` with
+ //! a message logged.
+ bool Is64Bit(bool* is_64_bit) const;
//! \brief Determines the target process’ start time.
//!
//! \param[out] start_time The time that the process started.
- void StartTime(timeval* start_time) const;
+ //!
+ //! \return `true` on success, with \a start_time set. Otherwise, `false` with
+ //! a message logged.
+ bool StartTime(timeval* start_time) const;
//! \brief Obtains the arguments used to launch a process.
//!
@@ -141,6 +150,25 @@ class ProcessInfo {
private:
#if defined(OS_MACOSX)
kinfo_proc kern_proc_info_;
+#elif defined(OS_LINUX) || defined(OS_ANDROID)
+ // Some members are marked mutable so that they can be lazily initialized by
+ // const methods. These are always InitializationState-protected so that
+ // multiple successive calls will always produce the same return value and out
+ // parameters. This is necessary for intergration with the Snapshot interface.
+ // See https://crashpad.chromium.org/bug/9.
+ std::set<gid_t> supplementary_groups_;
+ mutable timeval start_time_;
+ pid_t pid_;
+ pid_t ppid_;
+ uid_t uid_;
+ uid_t euid_;
+ uid_t suid_;
+ gid_t gid_;
+ gid_t egid_;
+ gid_t sgid_;
+ mutable InitializationState start_time_initialized_;
+ mutable InitializationState is_64_bit_initialized_;
+ mutable bool is_64_bit_;
#endif
InitializationStateDcheck initialized_;

Powered by Google App Engine
This is Rietveld 408576698