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

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: Remove unnecessary code, add unittest, update comments. 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..b14a1c0a9f3d23e93e282a166326dc1d7f731720 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_() {}
Lei Zhang 2015/09/10 18:38:19 probably unnecessary, ditto below
Tobias Sargeant 2015/09/11 09:07:49 Done.
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,8 +71,7 @@ class MinidumpDescriptor {
fd_(fd),
c_path_(NULL),
size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {
+ microdump_extra_info_() {
assert(fd != -1);
}
@@ -80,8 +79,7 @@ class MinidumpDescriptor {
: mode_(kWriteMicrodumpToConsole),
fd_(-1),
size_limit_(-1),
- microdump_build_fingerprint_(NULL),
- microdump_product_info_(NULL) {}
+ microdump_extra_info_() {}
explicit MinidumpDescriptor(const MinidumpDescriptor& descriptor);
MinidumpDescriptor& operator=(const MinidumpDescriptor& descriptor);
@@ -107,17 +105,10 @@ 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_;
- }
+ MicrodumpExtraInfo* microdump_extra_info() {
+ assert(mode_ == kWriteMicrodumpToConsole);
Lei Zhang 2015/09/10 18:38:19 just call IsMicrodumpOnConsole() ?
Tobias Sargeant 2015/09/11 09:07:49 Done.
+ return &microdump_extra_info_;
+ };
private:
enum DumpMode {
@@ -145,15 +136,15 @@ class MinidumpDescriptor {
off_t size_limit_;
- // The product name/version and build fingerprint that should be appended to
- // the dump (microdump only). Microdumps don't have the ability of appending
- // extra metadata after the dump is generated (as opposite to minidumps
- // MIME fields), therefore the product details must be provided upfront.
- // 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_;
+ // The extra microdump data (e.g. product name/version, build
+ // fingerprint, gpu fingerprint) that should be appended to the dump
+ // (microdump only). Microdumps don't have the ability of appending
+ // extra metadata after the dump is generated (as opposite to
+ // minidumps MIME fields), therefore the extra data must be provided
+ // upfront. The string pointers are supposed to be valid through
Primiano Tucci (use gerrit) 2015/09/10 13:58:31 As you moved this comment to extra info, you could
Tobias Sargeant 2015/09/11 09:07:49 Done.
+ // all the lifetime of the process (read: the caller has to
+ // guarantee that they are stored in global static storage).
+ MicrodumpExtraInfo microdump_extra_info_;
};
} // namespace google_breakpad

Powered by Google App Engine
This is Rietveld 408576698