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

Side by Side Diff: components/browser_watcher/postmortem_minidump_writer.h

Issue 2372633002: Use the correct product/version for postmortem reports (Closed)
Patch Set: Pass strings to PostmortemReportCollector's ctor Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_ 5 #ifndef COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_
6 #define COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_ 6 #define COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/files/file.h" 12 #include "base/files/file.h"
13 #include "components/browser_watcher/stability_report.pb.h" 13 #include "components/browser_watcher/stability_report.pb.h"
14 #include "third_party/crashpad/crashpad/util/misc/uuid.h" 14 #include "third_party/crashpad/crashpad/util/misc/uuid.h"
15 15
16 namespace browser_watcher { 16 namespace browser_watcher {
17 17
18 // Minidump information required by the Crashpad reporter. 18 // Minidump information required by the Crashpad reporter.
19 struct MinidumpInfo { 19 struct MinidumpInfo {
20 crashpad::UUID client_id; // The client's identifier. 20 crashpad::UUID client_id; // The client's identifier.
21 crashpad::UUID report_id; // The report's identifier. 21 crashpad::UUID report_id; // The report's identifier.
22 std::string product_name; // The product name to be used by the reporter. 22 std::string product_name; // The product name to be used by the reporter.
23 std::string version_number; // The product's version number. 23 std::string version_number; // The product's version number.
24 std::string channel_name; // The name of the channel.
rkaplow 2016/09/30 14:41:54 Can we point to any authoritative source on what t
manzagop (departed) 2016/09/30 18:54:20 I was more specific in the comment, though more on
25 std::string platform; // The platform identifier.
24 }; 26 };
25 27
26 // Write to |minidump_file| a minimal minidump that wraps |report|. Returns 28 // Write to |minidump_file| a minimal minidump that wraps |report|. Returns
27 // true on success, false otherwise. 29 // true on success, false otherwise.
28 // Note: the caller owns |minidump_file| and is responsible for keeping it valid 30 // Note: the caller owns |minidump_file| and is responsible for keeping it valid
29 // for this function's duration. |minidump_file| is expected to be empty 31 // for this function's duration. |minidump_file| is expected to be empty
30 // and a binary stream. 32 // and a binary stream.
31 bool WritePostmortemDump(base::PlatformFile minidump_file, 33 bool WritePostmortemDump(base::PlatformFile minidump_file,
32 const StabilityReport& report, 34 const StabilityReport& report,
33 const MinidumpInfo& minidump_info); 35 const MinidumpInfo& minidump_info);
34 36
35 } // namespace browser_watcher 37 } // namespace browser_watcher
36 38
37 #endif // COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_ 39 #endif // COMPONENTS_BROWSER_WATCHER_POSTMORTEM_MINIDUMP_WRITER_H_
OLDNEW
« no previous file with comments | « components/browser_watcher/DEPS ('k') | components/browser_watcher/postmortem_minidump_writer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698