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

Unified Diff: snapshot/process_snapshot.h

Issue 924673003: Add MinidumpCrashpadInfo::simple_annotations (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 10 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
« no previous file with comments | « snapshot/module_snapshot.h ('k') | snapshot/test/test_process_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/process_snapshot.h
diff --git a/snapshot/process_snapshot.h b/snapshot/process_snapshot.h
index 3fe317fa1f5517b082ccdabeb0a819833412d429..40811b0694b883b2699eba9f7375ce9901f82129 100644
--- a/snapshot/process_snapshot.h
+++ b/snapshot/process_snapshot.h
@@ -18,6 +18,8 @@
#include <sys/time.h>
#include <sys/types.h>
+#include <map>
+#include <string>
#include <vector>
namespace crashpad {
@@ -75,6 +77,32 @@ class ProcessSnapshot {
virtual void ProcessCPUTimes(timeval* user_time,
timeval* system_time) const = 0;
+ //! \brief Returns key-value string annotations recorded for the process,
+ //! system, or snapshot producer.
+ //!
+ //! This method retrieves annotations recorded for a process. These
+ //! annotations are intended for diagnostic use, including crash analysis.
+ //! “Simple annotations” are structured as a sequence of key-value pairs,
+ //! where all keys and values are strings. These are referred to in Chrome as
+ //! “crash keys.”
+ //!
+ //! Annotations stored here may reflect the process, system, or snapshot
+ //! producer. Most annotations not under the client’s direct control will be
+ //! retrievable by this method. For clients such as Chrome, this includes the
+ //! product name and version.
+ //!
+ //! Additional per-module annotations may be obtained by calling
+ //! ModuleSnapshot::AnnotationsSimpleMap().
+ //
+ // This interface currently returns a const& because all implementations store
+ // the data within their objects in this format, and are therefore able to
+ // provide this access without requiring a copy. Future implementations may
+ // obtain data on demand or store data in a different format, at which point
+ // the cost of maintaining this data in ProcessSnapshot subclass objects will
+ // need to be taken into account, and this interface possibly revised.
+ virtual const std::map<std::string, std::string>& AnnotationsSimpleMap()
+ const = 0;
+
//! \brief Returns a SystemSnapshot reflecting the characteristics of the
//! system that ran the snapshot process at the time of the snapshot.
//!
« no previous file with comments | « snapshot/module_snapshot.h ('k') | snapshot/test/test_process_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698