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

Unified Diff: src/client/linux/handler/minidump_descriptor.h

Issue 1334473003: Add GPU fingerprint information to breakpad microdumps. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Resolve TODO. Created 5 years, 3 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: src/client/linux/handler/minidump_descriptor.h
diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h
index 3584c6922a34f885f7cf510e372fdce460a9cf27..24a7b7e71c03a6a04f252e6e04121143a8ff7c6b 100644
--- a/src/client/linux/handler/minidump_descriptor.h
+++ b/src/client/linux/handler/minidump_descriptor.h
@@ -35,6 +35,7 @@
#include <string>
+#include "client/linux/handler/microdump_extra_info.h"
#include "common/using_std_string.h"
// This class describes how a crash dump should be generated, either:
@@ -49,11 +50,11 @@ class MinidumpDescriptor {
struct MicrodumpOnConsole {};
static const MicrodumpOnConsole kMicrodumpOnConsole;
- MinidumpDescriptor() : mode_(kUninitialized),
- fd_(-1),
- size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {}
+ MinidumpDescriptor()
+ : mode_(kUninitialized),
+ fd_(-1),
+ size_limit_(-1),
+ microdump_extra_info_() {}
explicit MinidumpDescriptor(const string& directory)
: mode_(kWriteMinidumpToFile),
@@ -61,8 +62,7 @@ class MinidumpDescriptor {
directory_(directory),
c_path_(NULL),
size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {
+ microdump_extra_info_() {
assert(!directory.empty());
}
@@ -71,17 +71,23 @@ class MinidumpDescriptor {
fd_(fd),
c_path_(NULL),
size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {
+ microdump_extra_info_() {
assert(fd != -1);
}
+ // TODO(tobiasjs): remove this ctor and associated struct once the
Primiano Tucci (use gerrit) 2015/09/10 12:38:58 I think you can already remove this here and fix t
Tobias Sargeant 2015/09/10 13:18:38 Done.
+ // MicrodumpExtraInfo ctor is used in Chromium.
explicit MinidumpDescriptor(const MicrodumpOnConsole&)
: mode_(kWriteMicrodumpToConsole),
fd_(-1),
size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {}
+ microdump_extra_info_() {}
+
+ explicit MinidumpDescriptor(const MicrodumpExtraInfo &microdump_extra_info)
+ : mode_(kWriteMicrodumpToConsole),
+ fd_(-1),
+ size_limit_(-1),
+ microdump_extra_info_(microdump_extra_info) {}
explicit MinidumpDescriptor(const MinidumpDescriptor& descriptor);
MinidumpDescriptor& operator=(const MinidumpDescriptor& descriptor);
@@ -107,17 +113,11 @@ class MinidumpDescriptor {
off_t size_limit() const { return size_limit_; }
void set_size_limit(off_t limit) { size_limit_ = limit; }
- // TODO(primiano): make this and product info (below) just part of the
- // microdump ctor once it is rolled stably into Chrome. ETA: June 2015.
- void SetMicrodumpBuildFingerprint(const char* build_fingerprint);
- const char* microdump_build_fingerprint() const {
- return microdump_build_fingerprint_;
- }
-
- void SetMicrodumpProductInfo(const char* product_info);
- const char* microdump_product_info() const {
- return microdump_product_info_;
- }
+ void SetMicrodumpExtraInfo(const MicrodumpExtraInfo &microdump_extra_info);
Primiano Tucci (use gerrit) 2015/09/10 12:38:58 Similarly, you could remove this also
Tobias Sargeant 2015/09/10 13:18:39 Done.
+ MicrodumpExtraInfo& microdump_extra_info() { return microdump_extra_info_; };
+ const MicrodumpExtraInfo& microdump_extra_info() const {
+ return microdump_extra_info_;
+ };
private:
enum DumpMode {
@@ -152,8 +152,7 @@ class MinidumpDescriptor {
// The string pointers are supposed to be valid through all the lifetime of
// the process (read: the caller has to guarantee that they are stored in
// global static storage).
- const char* microdump_build_fingerprint_;
- const char* microdump_product_info_;
+ MicrodumpExtraInfo microdump_extra_info_;
};
} // namespace google_breakpad

Powered by Google App Engine
This is Rietveld 408576698